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/winmm/initterm.cpp

    r1144 r2650  
    1 /* $Id: initterm.cpp,v 1.7 1999-10-05 19:24:00 phaller Exp $ */
     1/* $Id: initterm.cpp,v 1.8 2000-02-05 02:16:21 sandervl Exp $ */
    22
    33/*
     
    3535#include <odin.h>
    3636#include <win32type.h>
     37#include <winconst.h>
    3738#include <odinlx.h>
    3839#include "auxiliary.h"
     
    4344void CDECL _ctordtorInit( void );
    4445void CDECL _ctordtorTerm( void );
     46
     47 //Win32 resource table (produced by wrc)
     48 extern DWORD _Resource_PEResTab;
    4549}
     50//******************************************************************************
     51//******************************************************************************
     52BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     53{
     54   switch (fdwReason)
     55   {
     56   case DLL_PROCESS_ATTACH:
     57        return TRUE;
    4658
    47 /*-------------------------------------------------------------------*/
    48 /* A clean up routine registered with DosExitList must be used if    */
    49 /* runtime calls are required and the runtime is dynamically linked. */
    50 /* This will guarantee that this clean up routine is run before the  */
    51 /* library DLL is terminated.                                        */
    52 /*-------------------------------------------------------------------*/
    53 static void APIENTRY cleanup(ULONG reason);
     59   case DLL_THREAD_ATTACH:
     60   case DLL_THREAD_DETACH:
     61        return TRUE;
    5462
    55 
    56 
     63   case DLL_PROCESS_DETACH:
     64        auxOS2Close(); /* SvL: Close aux device if necessary */
     65        IRTMidiShutdown;  /* JT: Shutdown RT Midi subsystem, if running. */
     66        _ctordtorTerm();
     67        return TRUE;
     68   }
     69   return FALSE;
     70}
    5771/****************************************************************************/
    5872/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8195         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    8296
    83          if(RegisterLxDll(hModule, 0, 0) == FALSE)
     97         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    8498                return 0UL;
    85 
    86          /*******************************************************************/
    87          /* A DosExitList routine must be used to clean up if runtime calls */
    88          /* are required and the runtime is dynamically linked.             */
    89          /*******************************************************************/
    90 
    91          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    92          if(rc)
    93                 return 0UL;
    9499
    95100         break;
     
    107112   return 1UL;
    108113}
    109 
    110 
    111 static void APIENTRY cleanup(ULONG ulReason)
    112 {
    113    auxOS2Close();  /* SvL: Close aux device if necessary */
    114    IRTMidiShutdown;  /* JT: Shutdown RT Midi subsystem, if running. */
    115    _ctordtorTerm();
    116    DosExitList(EXLST_EXIT, cleanup);
    117    return ;
    118 }
    119 
     114//******************************************************************************
     115//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.