mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Move dmd files into compiler/
This commit is contained in:
parent
20bd0cacbd
commit
6374bb87b7
4579 changed files with 4 additions and 4 deletions
36
compiler/samples/mydll/dll.d
Normal file
36
compiler/samples/mydll/dll.d
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
// Public Domain
|
||||
|
||||
import core.sys.windows.windef;
|
||||
import core.sys.windows.dll;
|
||||
|
||||
__gshared HINSTANCE g_hInst;
|
||||
|
||||
extern (Windows)
|
||||
BOOL DllMain(HINSTANCE hInstance, ULONG ulReason, LPVOID pvReserved)
|
||||
{
|
||||
switch (ulReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
g_hInst = hInstance;
|
||||
dll_process_attach( hInstance, true );
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
dll_process_detach( hInstance, true );
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
dll_thread_attach( true, true );
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
dll_thread_detach( true, true );
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue