Ignore:
Timestamp:
Jul 20, 2001, 5:42:38 PM (24 years ago)
Author:
sandervl
Message:

initterm update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comdlg32/initterm.cpp

    r5135 r6375  
    3636#include <initdll.h>
    3737
    38 extern "C" {
    39  //Win32 resource table (produced by wrc)
    40  extern DWORD _Resource_PEResTab;
    41 
    42  BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved);
    43 }
    44 
    45 static HMODULE dllHandle = 0;
    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 COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad);
    57 
    58    case DLL_PROCESS_DETACH:
    59         COMDLG32_DllEntryPoint(hinstDLL, fdwReason, fImpLoad);
    60         ctordtorTerm();
    61         return TRUE;
    62    }
    63    return FALSE;
    64 }
    6538/****************************************************************************/
    6639/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8962         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    9063
    91          /*******************************************************************/
    92          /* A DosExitList routine must be used to clean up if runtime calls */
    93          /* are required and the runtime is dynamically linked.             */
    94          /*******************************************************************/
     64         return inittermComdlg32(hModule, ulFlag);
    9565
    96          dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab,
    97                                    COMDLG32_MAJORIMAGE_VERSION, COMDLG32_MINORIMAGE_VERSION,
    98                                    IMAGE_SUBSYSTEM_WINDOWS_GUI);
    99          if(dllHandle == 0)
    100                 return 0UL;
     66      case 1 :
     67         inittermComdlg32(hModule, ulFlag);
     68         ctordtorTerm();
     69         break;
    10170
    102          break;
    103       case 1 :
    104          if(dllHandle) {
    105                 UnregisterLxDll(dllHandle);
    106          }
    107          break;
    10871      default  :
    10972         return 0UL;
Note: See TracChangeset for help on using the changeset viewer.