Changeset 511 for trunk/src/comctl32


Ignore:
Timestamp:
Aug 16, 1999, 6:55:33 PM (26 years ago)
Author:
sandervl
Message:

Put back ctordtorinit/Term

File:
1 edited

Legend:

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

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.5 1999-08-16 16:28:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.6 1999-08-16 16:55:32 sandervl Exp $ */
    22/*
    33 * COMCTL32 DLL entry point
     
    3333#include <misc.h>       /*PLF Wed  98-03-18 23:18:29*/
    3434
     35extern "C" {
     36void CDECL _ctordtorInit( void );
     37void CDECL _ctordtorTerm( void );
     38}
     39
     40/*-------------------------------------------------------------------*/
     41/* A clean up routine registered with DosExitList must be used if    */
     42/* runtime calls are required and the runtime is dynamically linked. */
     43/* This will guarantee that this clean up routine is run before the  */
     44/* library DLL is terminated.                                        */
     45/*-------------------------------------------------------------------*/
     46static void APIENTRY cleanup(ULONG reason);
     47
    3548void CDECL RegisterCOMCTL32WindowClasses(unsigned long hinstDLL);
    3649void CDECL UnregisterCOMCTL32WindowClasses(void);
     
    5972      case 0 :
    6073
     74         _ctordtorInit();
     75
    6176         /*******************************************************************/
    62          /* The C run-time environment initialization function must be      */
    63          /* called before any calls to C run-time functions that are not    */
    64          /* inlined.                                                        */
     77         /* A DosExitList routine must be used to clean up if runtime calls */
     78         /* are required and the runtime is dynamically linked.             */
    6579         /*******************************************************************/
     80
     81         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     82         if(rc)
     83                return 0UL;
    6684
    6785         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     
    7290         break;
    7391      case 1 :
    74          /* unregister Win32 window classes */
    75          UnregisterCOMCTL32WindowClasses();
    7692         break;
    7793      default  :
     
    85101}
    86102
     103static void APIENTRY cleanup(ULONG ulReason)
     104{
     105   /* unregister Win32 window classes */
     106   UnregisterCOMCTL32WindowClasses();
     107   _ctordtorTerm();
     108   DosExitList(EXLST_EXIT, cleanup);
     109   return ;
     110}
Note: See TracChangeset for help on using the changeset viewer.