Ignore:
Timestamp:
Mar 11, 2000, 6:07:46 PM (25 years ago)
Author:
sandervl
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/initterm.cpp

    r2962 r3086  
    1 /* $Id: initterm.cpp,v 1.2 2000-03-01 18:49:30 jeroen Exp $ */
     1/* $Id: initterm.cpp,v 1.3 2000-03-11 17:06:34 sandervl Exp $ */
    22
    33/*
     
    3333#include <odin.h>
    3434#include <win32type.h>
     35#include <winconst.h>
    3536#include <odinlx.h>
    3637#include <misc.h>                      /* PLF Wed  98-03-18 23:18:15       */
     
    3940void CDECL _ctordtorInit( void );
    4041void CDECL _ctordtorTerm( void );
     42
     43 //Win32 resource table (produced by wrc)
     44 extern DWORD _Resource_PEResTab;
    4145}
    4246
     
    4650#endif
    4751
    48 /*-------------------------------------------------------------------*/
    49 /* A clean up routine registered with DosExitList must be used if    */
    50 /* runtime calls are required and the runtime is dynamically linked. */
    51 /* This will guarantee that this clean up routine is run before the  */
    52 /* library DLL is terminated.                                        */
    53 /*-------------------------------------------------------------------*/
    54 static void APIENTRY cleanup(ULONG reason);
     52//* ******************************************************************************/
     53//* ******************************************************************************/
     54BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     55{
     56   switch (fdwReason)
     57   {
     58     case DLL_PROCESS_ATTACH:
     59     case DLL_THREAD_ATTACH:
     60     case DLL_THREAD_DETACH:
     61       return TRUE;
    5562
     63     case DLL_PROCESS_DETACH:
     64       DiveGlobalTerminate();
     65       _ctordtorTerm();
     66       return TRUE;
     67   }
     68   return FALSE;
     69}
    5670
    5771/****************************************************************************/
     
    86100         /*******************************************************************/
    87101
    88          if(RegisterLxDll(hModule, 0, 0) == FALSE)
    89                 return 0UL;
    90 
    91          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    92          if(rc)
     102         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    93103                return 0UL;
    94104
     
    113123}
    114124
    115 
    116 static void APIENTRY cleanup(ULONG ulReason)
    117 {
    118    DiveGlobalTerminate();
    119 
    120    _ctordtorTerm();
    121 
    122    DosExitList(EXLST_EXIT, cleanup);
    123 
    124    return ;
    125 }
Note: See TracChangeset for help on using the changeset viewer.