Changeset 3086 for trunk/src/opengl/mesa/initterm.cpp
- Timestamp:
- Mar 11, 2000, 6:07:46 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/initterm.cpp
r2962 r3086 1 /* $Id: initterm.cpp,v 1. 2 2000-03-01 18:49:30 jeroenExp $ */1 /* $Id: initterm.cpp,v 1.3 2000-03-11 17:06:34 sandervl Exp $ */ 2 2 3 3 /* … … 33 33 #include <odin.h> 34 34 #include <win32type.h> 35 #include <winconst.h> 35 36 #include <odinlx.h> 36 37 #include <misc.h> /* PLF Wed 98-03-18 23:18:15 */ … … 39 40 void CDECL _ctordtorInit( void ); 40 41 void CDECL _ctordtorTerm( void ); 42 43 //Win32 resource table (produced by wrc) 44 extern DWORD _Resource_PEResTab; 41 45 } 42 46 … … 46 50 #endif 47 51 48 /*-------------------------------------------------------------------*/ 49 /* A clean up routine registered with DosExitList must be used if */ 50 /* runtime calls are required and the runtime is dynamically linked. */ 51 /* This will guarantee that this clean up routine is run before the */ 52 /* library DLL is terminated. */ 53 /*-------------------------------------------------------------------*/ 54 static void APIENTRY cleanup(ULONG reason); 52 //* ******************************************************************************/ 53 //* ******************************************************************************/ 54 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 55 { 56 switch (fdwReason) 57 { 58 case DLL_PROCESS_ATTACH: 59 case DLL_THREAD_ATTACH: 60 case DLL_THREAD_DETACH: 61 return TRUE; 55 62 63 case DLL_PROCESS_DETACH: 64 DiveGlobalTerminate(); 65 _ctordtorTerm(); 66 return TRUE; 67 } 68 return FALSE; 69 } 56 70 57 71 /****************************************************************************/ … … 86 100 /*******************************************************************/ 87 101 88 if(RegisterLxDll(hModule, 0, 0) == FALSE) 89 return 0UL; 90 91 rc = DosExitList(0x0000F000|EXLST_ADD, cleanup); 92 if(rc) 102 if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE) 93 103 return 0UL; 94 104 … … 113 123 } 114 124 115 116 static void APIENTRY cleanup(ULONG ulReason)117 {118 DiveGlobalTerminate();119 120 _ctordtorTerm();121 122 DosExitList(EXLST_EXIT, cleanup);123 124 return ;125 }
Note:
See TracChangeset
for help on using the changeset viewer.