Artifact 1df1b32171114527013bbfa05143922adaaa7674
import core.sys.windows.dll;
import core.sys.windows.windows;
import std.stdio;
//----------------------------------------------------------------
// おきまりのDLL初期化ルーチン
//----------------------------------------------------------------
extern (Windows)
BOOL DllMain( HINSTANCE inst, ULONG reason, void* reserved )
{
switch( reason )
{
case DLL_PROCESS_ATTACH:
dll_process_attach( inst, true );
break;
case DLL_PROCESS_DETACH:
_fcloseallp = null; // Do not close stdin/out/errs!!!
dll_process_detach( inst, true );
break;
case DLL_THREAD_ATTACH:
dll_thread_attach( true, true );
break;
case DLL_THREAD_DETACH:
dll_thread_detach( true, true );
break;
default:
}
return true;
}