Changeset 6375 for trunk/src/comctl32/initterm.cpp
- Timestamp:
- Jul 20, 2001, 5:42:38 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/initterm.cpp
r5416 r6375 36 36 #include <initdll.h> 37 37 38 extern "C" {39 //Win32 resource table (produced by wrc)40 extern DWORD _Resource_PEResTab;41 }42 43 static HMODULE dllHandle = 0;44 45 BOOL WINAPI COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);46 47 //******************************************************************************48 //******************************************************************************49 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)50 {51 switch (fdwReason)52 {53 case DLL_PROCESS_ATTACH:54 case DLL_THREAD_ATTACH:55 case DLL_THREAD_DETACH:56 return COMCTL32_LibMain(hinstDLL, fdwReason, fImpLoad);57 58 case DLL_PROCESS_DETACH:59 {60 BOOL ret = COMCTL32_LibMain(hinstDLL, fdwReason, fImpLoad);61 ctordtorTerm();62 return ret;63 }64 }65 return FALSE;66 }67 38 /****************************************************************************/ 68 39 /* _DLL_InitTerm is the function that gets called by the operating system */ … … 87 58 switch (ulFlag) { 88 59 case 0 : 89 90 60 ctordtorInit(); 91 92 /*******************************************************************/93 /* A DosExitList routine must be used to clean up if runtime calls */94 /* are required and the runtime is dynamically linked. */95 /*******************************************************************/96 97 dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab,98 COMCTL32_MAJORIMAGE_VERSION, COMCTL32_MINORIMAGE_VERSION,99 IMAGE_SUBSYSTEM_WINDOWS_GUI);100 if(dllHandle == 0)101 return 0UL;102 103 61 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 104 62 63 return inittermComctl32(hModule, ulFlag); 64 65 case 1 : 66 inittermComctl32(hModule, ulFlag); 67 ctordtorTerm(); 105 68 break; 106 case 1 : 107 if(dllHandle) { 108 UnregisterLxDll(dllHandle); 109 } 110 break; 69 111 70 default : 112 71 return 0UL;
Note:
See TracChangeset
for help on using the changeset viewer.