* renamed to BlockAllocator * now it's template with compile time assingable block_size and block_in_allocation variables -WIP Event management * probably working sendSelfEvent() * registerEvent() -added win_dll.d as Windows DLL require functionality
30 lines
No EOL
603 B
D
30 lines
No EOL
603 B
D
module win_dll;
|
|
|
|
version(Windows):
|
|
|
|
import core.sys.windows.dll;
|
|
import core.sys.windows.windows;
|
|
|
|
extern(Windows) bool DllMain(void* hInstance, uint ulReason, void*)
|
|
{
|
|
switch (ulReason)
|
|
{
|
|
default: assert(0);
|
|
case DLL_PROCESS_ATTACH:
|
|
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;
|
|
}
|
|
return true;
|
|
} |