Changeset 2647 for trunk/src/comdlg32/initterm.cpp
- Timestamp:
- Feb 5, 2000, 2:54:33 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/initterm.cpp
r1548 r2647 1 /* $Id: initterm.cpp,v 1. 8 1999-11-02 19:09:42sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.9 2000-02-05 01:54:33 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*/ … … 45 46 BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved); 46 47 } 48 //****************************************************************************** 49 //****************************************************************************** 50 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 51 { 52 switch (fdwReason) 53 { 54 case DLL_PROCESS_ATTACH: 55 case DLL_THREAD_ATTACH: 56 case DLL_THREAD_DETACH: 57 return COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad); 47 58 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); 55 56 59 case DLL_PROCESS_DETACH: 60 COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad); 61 _ctordtorTerm(); 62 return TRUE; 63 } 64 return FALSE; 65 } 57 66 /****************************************************************************/ 58 67 /* _DLL_InitTerm is the function that gets called by the operating system */ … … 86 95 /*******************************************************************/ 87 96 88 if(RegisterLxDll(hModule, COMDLG32_DllEntryPoint, (PVOID)&_Resource_PEResTab) == FALSE)97 if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE) 89 98 return 0UL; 90 91 rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);92 if(rc)93 return 0UL;94 99 95 100 break; … … 106 111 return 1UL; 107 112 } 108 109 110 static void APIENTRY cleanup(ULONG ulReason)111 {112 _ctordtorTerm();113 DosExitList(EXLST_EXIT, cleanup);114 return ;115 }
Note:
See TracChangeset
for help on using the changeset viewer.