#include <library.h>
#include <windows.h>
int DllMain (void *hinstDLL, unsigned long fdwReason, void *lvpReserved)
{
#pragma unused(lvpReserved)
switch (fdwReason)
{
default:
return FALSE;
case DLL_NLM_STARTUP:
register_destructor((int) hinstDLL, (int (*)(void *)) NULL);
return TRUE;
case DLL_NLM_SHUTDOWN:
case DLL_PROCESS_ATTACH:
case DLL_PROCESS_DETACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_ACTUAL_DLLMAIN:
return TRUE;
}
return FALSE;
}
