Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wdll_main.h
Go to the documentation of this file.
1 // for each project that builds a shared-library, include this "header" in
2 // one source file that is on the linker command line.
3 // (avoids the ICC remark "Main entry point was not seen")
4 
5 #if OS_WIN
7 
8 BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD UNUSED(reason), LPVOID UNUSED(reserved))
9 {
10  // avoid unnecessary DLL_THREAD_ATTACH/DETACH calls
11  // (ignore failure - happens if the DLL uses TLS)
12  (void)DisableThreadLibraryCalls(hInstance);
13  return TRUE; // success (ignored unless reason == DLL_PROCESS_ATTACH)
14 }
15 
16 #endif
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
#define WINAPI
Definition: zlib.h:35
int BOOL
Definition: wgl.h:51
unsigned long DWORD
Definition: wgl.h:56
void * LPVOID
Definition: wgl.h:50