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

Makefile changes & initterm.cpp no longer calls c/c++ library init & termination functions (should only be done in odincrt.dll)

File:
1 edited

Legend:

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

    r131 r510  
    1 /* $Id: initterm.cpp,v 1.4 1999-06-20 14:02:12 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:28:02 sandervl Exp $ */
    22/*
    3  * COMDLG32 DLL entry point
     3 * COMCTL32 DLL entry point
    44 *
    55 * Copyright 1998 Sander van Leeuwen
     
    3333#include <misc.h>       /*PLF Wed  98-03-18 23:18:29*/
    3434
    35 extern "C" {
    36 /*-------------------------------------------------------------------*/
    37 /* _CRT_init is the C run-time environment initialization function.  */
    38 /* It will return 0 to indicate success and -1 to indicate failure.  */
    39 /*-------------------------------------------------------------------*/
    40 int CDECL CRT_init(void);
    41 /*-------------------------------------------------------------------*/
    42 /* _CRT_term is the C run-time environment termination function.     */
    43 /* It only needs to be called when the C run-time functions are      */
    44 /* statically linked.                                                */
    45 /*-------------------------------------------------------------------*/
    46 void CDECL CRT_term(void);
    47 void CDECL _ctordtorInit( void );
    48 void CDECL _ctordtorTerm( void );
    49 }
    50 
    5135void CDECL RegisterCOMCTL32WindowClasses(unsigned long hinstDLL);
    5236void CDECL UnregisterCOMCTL32WindowClasses(void);
    53 
    54 /*-------------------------------------------------------------------*/
    55 /* A clean up routine registered with DosExitList must be used if    */
    56 /* runtime calls are required and the runtime is dynamically linked. */
    57 /* This will guarantee that this clean up routine is run before the  */
    58 /* library DLL is terminated.                                        */
    59 /*-------------------------------------------------------------------*/
    60 static void APIENTRY cleanup(ULONG reason);
    61 
    6237
    6338/****************************************************************************/
     
    9065         /*******************************************************************/
    9166
    92          if (CRT_init() == -1)
    93             return 0UL;
    94          _ctordtorInit();
    95 
    9667         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    97 
    98          /*******************************************************************/
    99          /* A DosExitList routine must be used to clean up if runtime calls */
    100          /* are required and the runtime is dynamically linked.             */
    101          /*******************************************************************/
    102 
    103          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    104          if(rc)
    105                 return 0UL;
    10668
    10769         /* register Win32 window classes implemented in this DLL */
     
    11072         break;
    11173      case 1 :
     74         /* unregister Win32 window classes */
     75         UnregisterCOMCTL32WindowClasses();
    11276         break;
    11377      default  :
     
    12185}
    12286
    123 
    124 static void APIENTRY cleanup(ULONG ulReason)
    125 {
    126    /* unregister Win32 window classes */
    127    UnregisterCOMCTL32WindowClasses();
    128 
    129    _ctordtorTerm();
    130    CRT_term();
    131    DosExitList(EXLST_EXIT, cleanup);
    132    return ;
    133 }
Note: See TracChangeset for help on using the changeset viewer.