DLL fixes for windows; fixes #175

This commit is contained in:
Zahary Karadjov 2012-07-31 18:50:53 +03:00
commit 1d065b601c
4 changed files with 16 additions and 11 deletions

View file

@ -861,7 +861,8 @@ proc genMainProc(m: BModule) =
CommonMainBody & "}$n"
WinCDllMain =
"BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fwdreason, $n" &
" LPVOID lpvReserved) {$n" & "\tNimMain();$n" &
" LPVOID lpvReserved) {$n" &
"\tif(fwdreason == DLL_PROCESS_ATTACH) NimMain();$n" &
"\treturn 1;$n" & "}$n"
PosixNimDllMain = WinNimDllMain
PosixCDllMain =