Changeset 511 for trunk/src


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

Put back ctordtorinit/Term

Location:
trunk/src
Files:
21 edited

Legend:

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

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:01 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:31 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/advapi32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:01 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:31 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/capi2032/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:01 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:31 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • 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}
  • trunk/src/comdlg32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/ddraw/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.6 1999-08-16 16:28:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.7 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/dsound/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.3 1999-08-16 16:28:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/gdi32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/kernel32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.8 1999-08-16 16:28:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.9 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    4545extern void APIENTRY Win32DllExitList(ULONG reason);
    4646
     47extern "C" {
     48void CDECL _ctordtorInit( void );
     49void CDECL _ctordtorTerm( void );
     50}
     51
    4752/* Tue 03.03.1998: knut */
    4853/* flag to optimize DosAllocMem to use all the memory on SMP machines */
     
    8287        case 0 :
    8388            dprintf(("kernel32 init\n"));
     89            _ctordtorInit();
     90
    8491            CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    8592            /*******************************************************************/
     
    120127{
    121128    dprintf(("kernel32 exit %d\n", ulReason));
     129    _ctordtorTerm();
    122130    DestroyTIB();
    123131    DosExitList(EXLST_EXIT, cleanup);
  • trunk/src/lz32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.2 1999-08-16 16:28:03 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.3 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/mpr/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:03 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/ole32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:03 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:32 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/shell32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:03 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/tapi32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/user32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.6 1999-08-16 16:28:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.7 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    4646static void APIENTRY cleanupQueue(ULONG ulReason);
    4747
     48extern "C" {
     49void CDECL _ctordtorInit( void );
     50void CDECL _ctordtorTerm( void );
     51}
    4852
    4953/****************************************************************************/
     
    6973   switch (ulFlag) {
    7074      case 0 :
     75         _ctordtorInit();
     76
    7177         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    7278         /*******************************************************************/
     
    112118   dprintf(("user32 exit\n"));
    113119   UnregisterSystemClasses();
     120   _ctordtorTerm();
    114121   dprintf(("user32 exit done\n"));
    115122   DosExitList(EXLST_EXIT, cleanup);
  • trunk/src/user32/new/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    4646static void APIENTRY cleanupQueue(ULONG ulReason);
    4747
     48extern "C" {
     49void CDECL _ctordtorInit( void );
     50void CDECL _ctordtorTerm( void );
     51}
    4852
    4953
     
    7074   switch (ulFlag) {
    7175      case 0 :
     76         _ctordtorInit();
    7277
    7378         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     
    120125   dprintf(("user32 exit\n"));
    121126   UnregisterSystemClasses();
     127   _ctordtorTerm();
    122128   dprintf(("user32 exit done\n"));
    123129   DosExitList(EXLST_EXIT, cleanup);
  • trunk/src/version/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/winmm/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    3939extern "C" {
    4040void IRTMidiShutdown();  // IRTMidi shutdown routine
     41void CDECL _ctordtorInit( void );
     42void CDECL _ctordtorTerm( void );
    4143}
    4244
     
    7375   switch (ulFlag) {
    7476      case 0 :
     77         _ctordtorInit();
    7578
    7679         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     
    104107   auxOS2Close();  /* SvL: Close aux device if necessary */
    105108   IRTMidiShutdown;  /* JT: Shutdown RT Midi subsystem, if running. */
     109   _ctordtorTerm();
    106110   DosExitList(EXLST_EXIT, cleanup);
    107111   return ;
  • trunk/src/winspool/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/wnetap32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:05 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
  • trunk/src/wsock32/initterm.cpp

    r510 r511  
    1 /* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:05 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:55:33 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     35
     36extern "C" {
     37void CDECL _ctordtorInit( void );
     38void CDECL _ctordtorTerm( void );
     39}
     40
     41/*-------------------------------------------------------------------*/
     42/* A clean up routine registered with DosExitList must be used if    */
     43/* runtime calls are required and the runtime is dynamically linked. */
     44/* This will guarantee that this clean up routine is run before the  */
     45/* library DLL is terminated.                                        */
     46/*-------------------------------------------------------------------*/
     47static void APIENTRY cleanup(ULONG reason);
     48
    3549
    3650/****************************************************************************/
     
    5670   switch (ulFlag) {
    5771      case 0 :
    58          CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     72         _ctordtorInit();
     73
     74         /*******************************************************************/
     75         /* A DosExitList routine must be used to clean up if runtime calls */
     76         /* are required and the runtime is dynamically linked.             */
     77         /*******************************************************************/
     78
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
     80         if(rc)
     81                return 0UL;
     82
    5983         break;
    6084      case 1 :
     
    6993   return 1UL;
    7094}
     95
     96
     97static void APIENTRY cleanup(ULONG ulReason)
     98{
     99   _ctordtorTerm();
     100   DosExitList(EXLST_EXIT, cleanup);
     101   return ;
     102}
Note: See TracChangeset for help on using the changeset viewer.