25 #ifndef SYSTEM_DLLMAIN_ICPP
26 #define SYSTEM_DLLMAIN_ICPP 1
30 #if !defined( GAUDIKERNEL_LOADFACTORYENTRIES_H )
31 # warning "deprecated header file, not to be used"
37 #if !defined( __APPLE__ )
43 static void finalize(
void* hinstDLL );
47 #if defined( _WIN32 ) && defined( _DLL )
59 win::BOOL APIENTRY DllMain( win::HINSTANCE hinstDLL,
61 win::LPVOID lpvReserved
64 switch ( fdwReason ) {
65 case DLL_PROCESS_ATTACH: {
68 case DLL_THREAD_ATTACH:
70 case DLL_THREAD_DETACH:
72 case DLL_PROCESS_DETACH: {
82 static void _init() __attribute__( ( constructor ) );
83 static
void _fini() __attribute__( ( destructor ) );
87 #elif defined( __APPLE__ )
88 static void _init() __attribute__( ( constructor ) );
89 static
void _fini() __attribute__( ( destructor ) );
100 #endif // SYSTEM_DLLMAIN_ICPP