Ignore:
Timestamp:
Feb 5, 2000, 3:19:44 AM (26 years ago)
Author:
sandervl
Message:

Added version resource

File:
1 edited

Legend:

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

    r2254 r2650  
    1 /* $Id: initterm.cpp,v 1.8 1999-12-29 18:51:45 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.9 2000-02-05 01:59:24 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*/
     
    4344 extern DWORD _Resource_PEResTab;
    4445}
     46//******************************************************************************
     47//******************************************************************************
     48BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     49{
     50   switch (fdwReason)
     51   {
     52   case DLL_PROCESS_ATTACH:
     53        return TRUE;
    4554
    46 /*-------------------------------------------------------------------*/
    47 /* A clean up routine registered with DosExitList must be used if    */
    48 /* runtime calls are required and the runtime is dynamically linked. */
    49 /* This will guarantee that this clean up routine is run before the  */
    50 /* library DLL is terminated.                                        */
    51 /*-------------------------------------------------------------------*/
    52 static void APIENTRY cleanup(ULONG reason);
     55   case DLL_THREAD_ATTACH:
     56   case DLL_THREAD_DETACH:
     57        return TRUE;
    5358
    54 
     59   case DLL_PROCESS_DETACH:
     60        _ctordtorTerm();
     61        return TRUE;
     62   }
     63   return FALSE;
     64}
    5565/****************************************************************************/
    5666/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8494         /*******************************************************************/
    8595
    86          if(RegisterLxDll(hModule, 0, (PVOID)&_Resource_PEResTab) == FALSE)
     96         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    8797                return 0UL;
    88 
    89          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    90          if(rc)
    91                 return 0UL;
    9298
    9399         break;
     
    104110   return 1UL;
    105111}
    106 
    107 
    108 static void APIENTRY cleanup(ULONG ulReason)
    109 {
    110    _ctordtorTerm();
    111    DosExitList(EXLST_EXIT, cleanup);
    112    return ;
    113 }
     112//******************************************************************************
     113//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.