Hs2lib-0.4.8: Templates/main.template-win.c
#include <windows.h>
#include <Rts.h>
extern void __stginit_%name(void);
static char* args[] = { "ghcDll", NULL };
/* N.B. argv arrays must end with NULL */
BOOL
%callconv
DllMain
( HANDLE hModule
, DWORD reason
, void* reserved
)
{
if (reason == DLL_PROCESS_ATTACH) {
/* By now, the RTS DLL should have been hoisted in, but we need to start it up. */
startupHaskell(1, args, __stginit_%name);
return TRUE;
}
return TRUE;
}