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/comctl32/initterm.cpp

    r5416 r6375  
    3636#include <initdll.h>
    3737
    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 }
    6738/****************************************************************************/
    6839/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8758   switch (ulFlag) {
    8859      case 0 :
    89 
    9060         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 
    10361         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    10462
     63         return inittermComctl32(hModule, ulFlag);
     64
     65      case 1 :
     66         inittermComctl32(hModule, ulFlag);
     67         ctordtorTerm();
    10568         break;
    106       case 1 :
    107          if(dllHandle) {
    108                 UnregisterLxDll(dllHandle);
    109          }
    110          break;
     69
    11170      default  :
    11271         return 0UL;
Note: See TracChangeset for help on using the changeset viewer.