2013-02-05 17:54:22 +00:00
|
|
|
#include <windef.h>
|
2007-12-16 02:32:20 +00:00
|
|
|
|
|
|
|
#ifdef BUILD_DLL
|
|
|
|
#define DLL_EXPORT __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define DLL_EXPORT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
|
|
|
switch (fdwReason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
// attach to process
|
|
|
|
// return FALSE to fail DLL load
|
|
|
|
break;
|
2021-09-13 01:33:14 +00:00
|
|
|
|
2007-12-16 02:32:20 +00:00
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
// detach from process
|
|
|
|
break;
|
2021-09-13 01:33:14 +00:00
|
|
|
|
2007-12-16 02:32:20 +00:00
|
|
|
case DLL_THREAD_ATTACH:
|
|
|
|
// attach to thread
|
|
|
|
break;
|
2021-09-13 01:33:14 +00:00
|
|
|
|
2007-12-16 02:32:20 +00:00
|
|
|
case DLL_THREAD_DETACH:
|
|
|
|
// detach from thread
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE; // succesful
|
|
|
|
}
|