Changeset 2647 for trunk/src/comctl32/initterm.cpp
- Timestamp:
- Feb 5, 2000, 2:54:33 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/initterm.cpp
r1402 r2647 1 /* $Id: initterm.cpp,v 1. 8 1999-10-22 18:04:10sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.9 2000-02-05 01:53:54 sandervl Exp $ */ 2 2 /* 3 3 * COMCTL32 DLL entry point … … 33 33 #include <misc.h> /*PLF Wed 98-03-18 23:18:29*/ 34 34 #include <win32type.h> 35 #include <winconst.h> 35 36 #include <odinlx.h> 36 37 … … 43 44 } 44 45 45 /*-------------------------------------------------------------------*/46 /* A clean up routine registered with DosExitList must be used if */47 /* runtime calls are required and the runtime is dynamically linked. */48 /* This will guarantee that this clean up routine is run before the */49 /* library DLL is terminated. */50 /*-------------------------------------------------------------------*/51 static void APIENTRY cleanup(ULONG reason);52 53 46 void CDECL RegisterCOMCTL32WindowClasses(unsigned long hinstDLL); 54 47 void CDECL UnregisterCOMCTL32WindowClasses(void); 55 48 49 //****************************************************************************** 50 //****************************************************************************** 51 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 52 { 53 switch (fdwReason) 54 { 55 case DLL_PROCESS_ATTACH: 56 return TRUE; 57 58 case DLL_THREAD_ATTACH: 59 case DLL_THREAD_DETACH: 60 return TRUE; 61 62 case DLL_PROCESS_DETACH: 63 /* unregister Win32 window classes */ 64 UnregisterCOMCTL32WindowClasses(); 65 _ctordtorTerm(); 66 return TRUE; 67 } 68 return FALSE; 69 } 56 70 /****************************************************************************/ 57 71 /* _DLL_InitTerm is the function that gets called by the operating system */ … … 84 98 /*******************************************************************/ 85 99 86 if(RegisterLxDll(hModule, 0, (PVOID)&_Resource_PEResTab) == FALSE)100 if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE) 87 101 return 0UL; 88 89 rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);90 if(rc)91 return 0UL;92 102 93 103 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ … … 109 119 return 1UL; 110 120 } 111 112 static void APIENTRY cleanup(ULONG ulReason) 113 { 114 /* unregister Win32 window classes */ 115 UnregisterCOMCTL32WindowClasses(); 116 _ctordtorTerm(); 117 DosExitList(EXLST_EXIT, cleanup); 118 return ; 119 } 121 //****************************************************************************** 122 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.