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

Cleanup fixes (call ctordtorTerm in existlist handler)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.