Changeset 2650 for trunk/src/msacm32


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

Added version resource

Location:
trunk/src/msacm32
Files:
1 added
2 edited

Legend:

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

    r951 r2650  
    1 /* $Id: initterm.cpp,v 1.2 1999-09-15 23:26:07 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.3 2000-02-05 02:02:34 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535#include <win32type.h>
     36#include <winconst.h>
    3637#include <odinlx.h>
    3738
     
    3940void CDECL _ctordtorInit( void );
    4041void CDECL _ctordtorTerm( void );
     42
     43 //Win32 resource table (produced by wrc)
     44 extern DWORD _Resource_PEResTab;
    4145}
    4246
    4347BOOL WINAPI MSACM32_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
    4448
    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 /*-------------------------------------------------------------------*/
    51 static void APIENTRY cleanup(ULONG reason);
     49//******************************************************************************
     50//******************************************************************************
     51BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     52{
     53   switch (fdwReason)
     54   {
     55   case DLL_PROCESS_ATTACH:
     56   case DLL_THREAD_ATTACH:
     57   case DLL_THREAD_DETACH:
     58        return MSACM32_LibMain(hinstDLL, fdwReason, fImpLoad);
    5259
    53 
     60   case DLL_PROCESS_DETACH:
     61        MSACM32_LibMain(hinstDLL, fdwReason, fImpLoad);
     62        _ctordtorTerm();
     63        return TRUE;
     64   }
     65   return FALSE;
     66}
    5467/****************************************************************************/
    5568/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    7891         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    7992
    80          if(RegisterLxDll(hModule, MSACM32_LibMain, 0) == FALSE)
     93         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    8194                return 0UL;
    82 
    83          /*******************************************************************/
    84          /* A DosExitList routine must be used to clean up if runtime calls */
    85          /* are required and the runtime is dynamically linked.             */
    86          /*******************************************************************/
    87 
    88          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    89          if(rc)
    90                 return 0UL;
    9195
    9296         break;
     
    104108   return 1UL;
    105109}
    106 
    107 
    108 static void APIENTRY cleanup(ULONG ulReason)
    109 {
    110    _ctordtorTerm();
    111    DosExitList(EXLST_EXIT, cleanup);
    112    return ;
    113 }
     110//******************************************************************************
     111//******************************************************************************
  • trunk/src/msacm32/makefile

    r2526 r2650  
    1 # $Id: makefile,v 1.6 2000-01-26 23:19:57 sandervl Exp $
     1# $Id: makefile,v 1.7 2000-02-05 02:02:34 sandervl Exp $
    22
    33#
     
    2323
    2424OBJS =  msacm32.obj filter.obj format.obj internal.obj \
    25         stream.obj driver.obj  initterm.obj
     25        stream.obj driver.obj  initterm.obj resource.obj
    2626
    2727all: $(TARGET).dll $(TARGET).lib
     
    4444        $(IMPDEF) $** $@
    4545
     46resource.asm: $(TARGET).rc
     47    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     48
     49resource.obj: resource.asm
    4650
    4751msacm32.obj: msacm32.cpp
Note: See TracChangeset for help on using the changeset viewer.