Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __gshared HINSTANCE g_hInst;
- extern(C) __gshared string[] rt_options = [ "gcopt=gc:manual" ];
- import core.runtime;
- import test.hoard;
- import std.stdio;
- extern (C) void gc_setProxy(void* p);
- export void initPlugin(void* gc, Hoard* hoard)
- {
- Runtime.initialize();
- gc_setProxy(gc);
- initHoard(hoard);
- }
- 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:
- break;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement