Changeset 8934 for trunk/src


Ignore:
Timestamp:
Jul 29, 2002, 1:26:49 PM (23 years ago)
Author:
sandervl
Message:

Cleanup fixes (call ctordtorTerm in existlist handler)

Location:
trunk/src/gdi32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/initgdi32.cpp

    r8099 r8934  
    1 /* $Id: initgdi32.cpp,v 1.12 2002-03-18 13:18:44 sandervl Exp $
     1/* $Id: initgdi32.cpp,v 1.13 2002-07-29 11:26:48 sandervl Exp $
    22 *
    33 * DLL entry point
     
    5656   {
    5757   case DLL_PROCESS_ATTACH:
    58     return TRUE;
     58       return TRUE;
    5959
    6060   case DLL_THREAD_ATTACH:
    6161   case DLL_THREAD_DETACH:
    62     return TRUE;
     62       return TRUE;
    6363
    6464   case DLL_PROCESS_DETACH:
    65     STATS_DumpStatsGDI32();
    66     ctordtorTerm();
    67     return TRUE;
     65       STATS_DumpStatsGDI32();
     66       return TRUE;
    6867   }
    6968   return FALSE;
  • trunk/src/gdi32/initterm.cpp

    r6646 r8934  
    1 /* $Id: initterm.cpp,v 1.20 2001-09-05 12:53:52 bird Exp $
     1/* $Id: initterm.cpp,v 1.21 2002-07-29 11:26:49 sandervl Exp $
    22 *
    33 * DLL entry point
     
    3434#include <winconst.h>
    3535#include <odinlx.h>
    36 #include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     36#include <dbglog.h>
     37#include "region.h"
     38#include <initdll.h>
     39#include <exitlist.h>
     40
    3741#define DBG_LOCALLOG    DBG_initterm
    3842#include "dbglocal.h"
    39 #include "region.h"
    40 #include <initdll.h>
     43
     44
     45/*-------------------------------------------------------------------*/
     46/* A clean up routine registered with DosExitList must be used if    */
     47/* runtime calls are required and the runtime is dynamically linked. */
     48/* This will guarantee that this clean up routine is run before the  */
     49/* library DLL is terminated.                                        */
     50/*-------------------------------------------------------------------*/
     51static void APIENTRY cleanup(ULONG reason);
    4152
    4253/****************************************************************************/
     
    6374         ctordtorInit();
    6475
     76         /*******************************************************************/
     77         /* A DosExitList routine must be used to clean up if runtime calls */
     78         /* are required and the runtime is dynamically linked.             */
     79         /*******************************************************************/
     80
     81         rc = DosExitList(EXITLIST_GDI32|EXLST_ADD, cleanup);
     82         if (rc)
     83            return 0UL;
     84
    6585         return inittermGdi32(hModule, ulFlag);
    6686
     
    7999//******************************************************************************
    80100//******************************************************************************
     101static void APIENTRY cleanup(ULONG ulReason)
     102{
     103    dprintf(("GDI32 exit"));
     104    ctordtorTerm();
     105
     106    DosExitList(EXLST_EXIT, cleanup);
     107    return ;
     108}
     109//******************************************************************************
     110//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.