Changeset 13230


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

Added version resource

Location:
tags/trunk/src
Files:
34 added
31 deleted
53 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/DPlayX/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.4 2000-01-26 23:19:54 sandervl Exp $
     1# $Id: makefile,v 1.5 2000-02-05 01:58:08 sandervl Exp $
    22
    33#
     
    2222TARGET = dplayx
    2323
    24 OBJS =  dplayx.obj initterm.obj
     24OBJS =  dplayx.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib $(PDWIN32_LIB)/advapi32.lib \
    3333              OS2386.LIB $(RTLLIB_O) \
     
    4343        $(IMPDEF) $** $@
    4444
     45resource.asm: $(TARGET).rc
     46    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4547
    46 initterm.obj: initterm.cpp
     48resource.obj: resource.asm
     49
    4750dplayx.obj:   dplayx.cpp
    4851
  • TabularUnified tags/trunk/src/NTDLL/initterm.cpp

    r12706 r13230  
    1 /* $Id: initterm.cpp,v 1.8 1999-12-18 20:01:13 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.9 2000-02-05 02:05:00 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}
    42 
    43 /*-------------------------------------------------------------------*/
    44 /* A clean up routine registered with DosExitList must be used if    */
    45 /* runtime calls are required and the runtime is dynamically linked. */
    46 /* This will guarantee that this clean up routine is run before the  */
    47 /* library DLL is terminated.                                        */
    48 /*-------------------------------------------------------------------*/
    49 static void APIENTRY cleanup(ULONG reason);
    50 
    5146
    5247BOOL WINAPI NTDLL_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
    5348
     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 NTDLL_LibMain(hinstDLL, fdwReason, fImpLoad);
     59
     60   case DLL_PROCESS_DETACH:
     61        NTDLL_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          /*******************************************************************/
    81          /* A DosExitList routine must be used to clean up if runtime calls */
    82          /* are required and the runtime is dynamically linked.             */
    83          /*******************************************************************/
    84 
    85          if(RegisterLxDll(hModule, NTDLL_LibMain, 0) == FALSE)
     93         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    8694                return 0UL;
    87 
    88          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    89          if(rc)
    90                 return 0UL;
    9195
    9296         break;
     
    103107   return 1UL;
    104108}
    105 
    106 
    107 static void APIENTRY cleanup(ULONG ulReason)
    108 {
    109    _ctordtorTerm();
    110    DosExitList(EXLST_EXIT, cleanup);
    111    return ;
    112 }
     109//******************************************************************************
     110//******************************************************************************
  • TabularUnified tags/trunk/src/NTDLL/makefile

    r13164 r13230  
    1 # $Id: makefile,v 1.17 2000-01-31 22:31:25 sandervl Exp $
     1# $Id: makefile,v 1.18 2000-02-05 02:05:00 sandervl Exp $
    22
    33#
     
    3434       unknown.obj\
    3535       arith64.obj\
    36        regfunc.obj
     36       regfunc.obj resource.obj
    3737
    3838
     
    4444$(TARGET).dll: $(OBJS) $(TARGET).def
    4545        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\user32.lib $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/crtdll.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    46 # PMWINX.LIB LIBULS.LIB LIBCONV.LIB
    4746        $(CP) $@ $(PDWIN32_BIN)
    4847
     
    5453        $(IMPDEF) $** $@
    5554
     55resource.asm: $(TARGET).rc
     56    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     57
     58resource.obj: resource.asm
    5659
    5760ntdll.obj:  .\ntdll.cpp  .\ntdll.h
  • TabularUnified tags/trunk/src/advapi32/lsa.cpp

    r12488 r13230  
    1 /* $Id: lsa.cpp,v 1.4 1999-11-30 22:07:19 sandervl Exp $ */
     1/* $Id: lsa.cpp,v 1.5 2000-02-05 01:51:39 sandervl Exp $ */
    22
    33/*
     
    6969#endif
    7070
    71 #define STATUS_ACCESS_DENIED           5 // ERROR_ACCESS_DENIED
    72 #define STATUS_INSUFFICIENT_RESOURCE   8 // ERROR_NO_SYSTEM_RESOURCES
    73 #define STATUS_INTERNAL_DB_ERROR      -1 // ERROR_INTERNAL_DB_ERROR
    74 #define STATUS_INVALID_HANDLE          6 // ERROR_INVALID_HANDLE
    75 #define STATUS_INVALID_SERVER_STATE   -2 // ERROR_INVALID_SERVER_STATE
    76 
    77 #ifndef STATUS_INVALID_PARAMETER
    78 #define STATUS_INVALID_PARAMETER      87 // ERROR_INVALID_PARAMETER
    79 #endif
    80 
    81 #define STATUS_OBJECT_NAME_NOT_FOUND   2 // ERROR_FILE_NOT_FOUND
    82 
    83 
    8471typedef DWORD ACCESS_MASK;
    8572
  • TabularUnified tags/trunk/src/advapi32/makefile

    r12926 r13230  
    1 # $Id: makefile,v 1.18 2000-01-06 20:05:00 sandervl Exp $
     1# $Id: makefile,v 1.19 2000-02-05 01:51:39 sandervl Exp $
    22
    33#
     
    2121TARGET = advapi32
    2222
    23 OBJS =  advapi32.obj initterm.obj registry.obj lsa.obj security.obj service.obj eventlog.obj crypt.obj
     23OBJS =  advapi32.obj resource.obj registry.obj lsa.obj security.obj service.obj eventlog.obj crypt.obj $(PDWIN32_LIB)/dllentry.obj
    2424
    2525
     
    4141        $(IMPDEF) $** $@
    4242
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     45
     46resource.obj: resource.asm
    4347
    4448advapi32.obj: advapi32.cpp advapi32.h $(PDWIN32_INCLUDE)\odinwrap.h
    4549registry.obj: registry.cpp $(PDWIN32_INCLUDE)\odinwrap.h
    4650lsa.obj:      lsa.cpp $(PDWIN32_INCLUDE)\odinwrap.h
    47 initterm.obj: initterm.cpp
    4851service.obj:  service.cpp
    4952crypt.obj:  crypt.cpp
  • TabularUnified tags/trunk/src/avifil32/makefile

    r12173 r13230  
    1 # $Id: makefile,v 1.4 1999-11-03 23:28:04 sandervl Exp $
     1# $Id: makefile,v 1.5 2000-02-05 01:52:22 sandervl Exp $
    22
    33#
     
    2121TARGET = avifil32
    2222
    23 OBJS =  avifile.obj initterm.obj
     23OBJS =  avifile.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    2929        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    30               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     30              $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) \
    32               $(PDWIN32_LIB)/ole32.lib $(PDWIN32_LIB)/msvfw32.lib
     32              $(PDWIN32_LIB)/ole32.lib $(PDWIN32_LIB)/msvfw32.lib 
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
     
    4141        $(IMPDEF) $** $@
    4242
    43 initterm.obj: initterm.cpp
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     45
     46resource.obj: resource.asm
     47
    4448avifile.obj:  avifile.cpp
    4549
  • TabularUnified tags/trunk/src/capi2032/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.8 2000-01-26 23:19:54 sandervl Exp $
     1# $Id: makefile,v 1.9 2000-02-05 01:53:05 sandervl Exp $
    22
    33#
     
    2222TARGET = capi2032
    2323
    24 OBJS =  capi2032.obj initterm.obj
     24OBJS =  capi2032.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626
     
    3030$(TARGET).dll: $(OBJS) $(TARGET).def
    3131        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    32               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    33               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
     32              $(PDWIN32_LIB)/kernel32.lib \
     33              $(PDWIN32_LIB)/odincrt.lib \
     34              OS2386.LIB $(RTLLIB_O)
    3435        $(CP) $@ $(PDWIN32_BIN)
    3536
     
    4243        $(IMPDEF) $** $@
    4344
     45resource.asm: $(TARGET).rc
     46    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     47
     48resource.obj: resource.asm
    4449
    4550capi2032.obj: capi2032.cpp capi2032.h
    46 initterm.obj: initterm.cpp
    4751
    4852clean:
  • TabularUnified tags/trunk/src/crtdll/crtdll.def

    r12807 r13230  
    1 ; $Id: crtdll.def,v 1.12 1999-12-28 10:31:00 sandervl Exp $
     1; $Id: crtdll.def,v 1.13 2000-02-05 01:55:11 sandervl Exp $
    22
    33;
     
    146146    _heapwalk                   = _CRTDLL__heapwalk             @133
    147147    _hypot                      = _CRTDLL__hypot                @134
    148     _initterm                   = _DLL_InitTerm                 @135
     148    _initterm                   = _CRTDLL_Init@12               @135
    149149    _iob                        = CRTDLL_iob                    @136
    150150    _isatty                     = _CRTDLL__isatty               @137
  • TabularUnified tags/trunk/src/crtdll/initterm.cpp

    r11543 r13230  
    1 /* $Id: initterm.cpp,v 1.2 1999-09-15 23:26:06 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.3 2000-02-05 01:55:11 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 WIN32API CRTDLL_Init(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 CRTDLL_Init(hinstDLL, fdwReason, fImpLoad);
    5259
    53 
     60   case DLL_PROCESS_DETACH:
     61        CRTDLL_Init(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          /*******************************************************************/
    81          /* A DosExitList routine must be used to clean up if runtime calls */
    82          /* are required and the runtime is dynamically linked.             */
    83          /*******************************************************************/
    84 
    85          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    86          if(rc)
    87                 return 0UL;
    88 
    89          if(RegisterLxDll(hModule, CRTDLL_Init, 0) == FALSE)
     93         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    9094                return 0UL;
    9195
     
    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//******************************************************************************
  • TabularUnified tags/trunk/src/crtdll/makefile

    r13199 r13230  
    1 # $Id: makefile,v 1.6 2000-02-03 21:37:49 sandervl Exp $
     1# $Id: makefile,v 1.7 2000-02-05 01:55:11 sandervl Exp $
    22
    33#
     
    2323
    2424OBJS =  crtdll.obj asmhlp.obj stubs.obj internal.obj crt_string.obj \
    25         crt_memory.obj crt_mb.obj crt_wc.obj initterm.obj
     25        crt_memory.obj crt_mb.obj crt_wc.obj initterm.obj resource.obj
    2626
    2727all: $(TARGET).dll $(TARGET).lib
     
    4242        $(IMPDEF) $** $@
    4343
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4446
    45 initterm.obj:   initterm.cpp
     47resource.obj: resource.asm
     48
     49initterm.obj:   initterm.cpp $(PDWIN32_INCLUDE)\exitlist.h
    4650asmhlp.obj:     asmhlp.asm
    4751stubs.obj:      stubs.cpp
  • TabularUnified tags/trunk/src/ddraw/initterm.cpp

    r12090 r13230  
    1 /* $Id: initterm.cpp,v 1.11 1999-10-28 22:39:21 hugh Exp $ */
     1/* $Id: initterm.cpp,v 1.12 2000-02-05 01:55:52 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*/
    37 #include "initterm.h"
    3838
    3939extern "C" {
    4040void CDECL _ctordtorInit( void );
    4141void CDECL _ctordtorTerm( void );
     42
     43 //Win32 resource table (produced by wrc)
     44 extern DWORD _Resource_PEResTab;
    4245}
    4346
    4447char ddrawPath[CCHMAXPATH] = "";
    4548
    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);
     49//******************************************************************************
     50//******************************************************************************
     51BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     52{
     53   switch (fdwReason)
     54   {
     55   case DLL_PROCESS_ATTACH:
     56        return TRUE;
    5357
     58   case DLL_THREAD_ATTACH:
     59   case DLL_THREAD_DETACH:
     60        return TRUE;
    5461
     62   case DLL_PROCESS_DETACH:
     63        _ctordtorTerm();
     64        return TRUE;
     65   }
     66   return FALSE;
     67}
    5568/****************************************************************************/
    5669/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    7891         _ctordtorInit();
    7992
    80    DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath);
     93         DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath);
    8194         char *endofpath = strrchr(ddrawPath, '\\');
    8295         if(endofpath) *(endofpath+1) = 0;
     
    8497         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    8598
    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    if(RegisterLxDll(hModule, 0, 0) == FALSE)
    92     return 0UL;
    93 
    94          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    95          if(rc)
    96                 return 0UL;
     99         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
     100                return 0UL;
    97101
    98102         break;
    99103      }
    100104      case 1 :
    101   UnregisterLxDll(hModule);
     105        UnregisterLxDll(hModule);
    102106         break;
    103107      default  :
     
    110114   return 1UL;
    111115}
    112 
    113 
    114 static void APIENTRY cleanup(ULONG ulReason)
    115 {
    116    _ctordtorTerm();
    117    DosExitList(EXLST_EXIT, cleanup);
    118    return ;
    119 }
     116//******************************************************************************
     117//******************************************************************************
  • TabularUnified tags/trunk/src/ddraw/makefile

    r13218 r13230  
    1 # $Id: makefile,v 1.17 2000-02-04 19:31:26 hugh Exp $
     1# $Id: makefile,v 1.18 2000-02-05 01:55:52 sandervl Exp $
    22#
    33# ddraw.dll makefile
     
    1313PDWIN32_LIB = ..\..\lib
    1414PDWIN32_BIN = ..\..\bin
     15PDWIN32_TOOLS = ..\..\tools\bin
    1516
    1617
    1718!include $(PDWIN32_INCLUDE)/pdwin32.mk
     19
    1820ASFLAGS = -Sc -Sv:ALP
    1921
     
    2527OBJS =  ddraw.obj os2ddraw.obj os2clipper.obj os2d3d.obj iccio1.obj asmutil.obj\
    2628        os2surface.obj os2palette.obj os2palset.obj rectangle.obj initterm.obj \
    27         os2util.obj bltFunc.obj fillfunc.obj colorconv.obj
     29        os2util.obj bltFunc.obj fillfunc.obj colorconv.obj resource.obj
    2830
    2931
    3032LIBS =  $(PDWIN32_LIB)\pmwinx.lib $(PDWIN32_LIB)\advapi32.lib $(PDWIN32_LIB)\gdi32.lib \
    3133        $(PDWIN32_LIB)\comctl32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\odincrt.lib \
    32         $(PDWIN32_LIB)\user32.lib $(PDWIN32_LIB)\ole32.lib mmpm2.lib OS2386.LIB $(RTLLIB_O)
     34        $(PDWIN32_LIB)\user32.lib mmpm2.lib OS2386.LIB $(RTLLIB_O)
    3335
    3436all: $(TARGET).dll $(TARGET).lib
     
    8991    $(PDWIN32_INCLUDE)\win\d3d.h
    9092
     93resource.asm: $(TARGET).rc
     94    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     95
     96resource.obj: resource.asm
     97
    9198rectangle.obj: rectangle.cpp rectangle.h
    9299
    93 initterm.obj: initterm.cpp initterm.h
     100initterm.obj: initterm.cpp initterm.h $(PDWIN32_INCLUDE)\exitlist.h
    94101
    95102os2util.obj:  os2util.cpp os2util.h
  • TabularUnified tags/trunk/src/dinput/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.2 2000-01-26 23:19:54 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 01:56:38 sandervl Exp $
    22
    33#
     
    2222TARGET = dinput
    2323
    24 OBJS =  dinput.obj initterm.obj oslibinput.obj dinputguid.obj
     24OBJS =  dinput.obj oslibinput.obj dinputguid.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) \
    33               $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/ole32.lib
     33              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/ole32.lib 
    3434        $(CP) $@ $(PDWIN32_BIN)
    3535
     
    4242        $(IMPDEF) $** $@
    4343
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4446
    45 initterm.obj: initterm.cpp oslibinput.h
     47resource.obj: resource.asm
     48
     49
    4650dinput.obj:   dinput.cpp oslibinput.h
    4751oslibinput.obj: oslibinput.cpp oslibinput.h $(PDWIN32_INCLUDE)\winkeyboard.h
  • TabularUnified tags/trunk/src/dplay/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.3 2000-01-26 23:19:55 sandervl Exp $
     1# $Id: makefile,v 1.4 2000-02-05 01:57:31 sandervl Exp $
    22
    33#
     
    2222TARGET = dplay
    2323
    24 OBJS =  dplay.obj initterm.obj
     24OBJS =  dplay.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) \
    33               $(PDWIN32_LIB)/ole32.lib $(PDWIN32_LIB)/advapi32.lib
     33              $(PDWIN32_LIB)/ole32.lib $(PDWIN32_LIB)/advapi32.lib 
    3434        $(CP) $@ $(PDWIN32_BIN)
    3535
     
    4242        $(IMPDEF) $** $@
    4343
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4446
    45 initterm.obj: initterm.cpp
     47resource.obj: resource.asm
     48
    4649dplay.obj:    dplay.cpp
    4750
  • TabularUnified tags/trunk/src/dsound/initterm.cpp

    r12330 r13230  
    1 /* $Id: initterm.cpp,v 1.8 1999-11-14 22:12:15 hugh Exp $ */
     1/* $Id: initterm.cpp,v 1.9 2000-02-05 01:58:50 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*/
    37 #include "initterm.h"
    3838
    3939extern "C" {
    4040void CDECL _ctordtorInit( void );
    4141void CDECL _ctordtorTerm( void );
     42
     43 //Win32 resource table (produced by wrc)
     44 extern DWORD _Resource_PEResTab;
    4245}
    4346
    44 char  dsoundPath[CCHMAXPATH] = "";
     47char dsoundPath[CCHMAXPATH] = "";
    4548
    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);
     49//******************************************************************************
     50//******************************************************************************
     51BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     52{
     53   switch (fdwReason)
     54   {
     55   case DLL_PROCESS_ATTACH:
     56        return TRUE;
    5357
     58   case DLL_THREAD_ATTACH:
     59   case DLL_THREAD_DETACH:
     60        return TRUE;
    5461
     62   case DLL_PROCESS_DETACH:
     63        _ctordtorTerm();
     64        return TRUE;
     65   }
     66   return FALSE;
     67}
    5568/****************************************************************************/
    5669/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    7689      case 0 :
    7790      {
    78          _ctordtorInit();
    79 
    80    DosQueryModuleName(hModule, CCHMAXPATH, dsoundPath);
     91         DosQueryModuleName(hModule, CCHMAXPATH, dsoundPath);
    8192         char *endofpath = strrchr(dsoundPath, '\\');
    8293         if(endofpath) *(endofpath+1) = 0;
     94         _ctordtorInit();
    8395
    8496         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    8597
    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    if(RegisterLxDll(hModule, 0, 0) == FALSE)
    92     return 0UL;
    93 
    94          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    95          if(rc)
    96                 return 0UL;
     98         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
     99                return 0UL;
    97100
    98101         break;
    99102      }
    100103      case 1 :
    101   UnregisterLxDll(hModule);
     104        UnregisterLxDll(hModule);
    102105         break;
    103106      default  :
     
    110113   return 1UL;
    111114}
    112 
    113 
    114 static void APIENTRY cleanup(ULONG ulReason)
    115 {
    116    _ctordtorTerm();
    117    DosExitList(EXLST_EXIT, cleanup);
    118    return ;
    119 }
     115//******************************************************************************
     116//******************************************************************************
  • TabularUnified tags/trunk/src/dsound/makefile

    r13217 r13230  
    1 # $Id: makefile,v 1.13 2000-02-04 19:29:17 hugh Exp $
     1# $Id: makefile,v 1.14 2000-02-05 01:58:50 sandervl Exp $
    22
    33#
     
    1414
    1515!include $(PDWIN32_INCLUDE)/pdwin32.mk
    16 ASFLAGS = -Sc -Sv:ALP
     16
    1717
    1818CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE)
     
    2222TARGET = dsound
    2323
    24 OBJS =  dsound.obj os2dsound.obj initterm.obj os2sndbuffer.obj os2helper.obj asmutil.obj
    25 #OBJS =  dsound.obj initterm.obj
     24OBJS =  dsound.obj os2dsound.obj initterm.obj os2sndbuffer.obj os2helper.obj resource.obj
    2625
    2726all: $(TARGET).dll $(TARGET).lib
     
    3029$(TARGET).dll: $(OBJS) $(TARGET).def
    3130        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    32               pmwinx.lib  $(PDWIN32_LIB)/kernel32.lib \
     31              pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3332              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3433        $(CP) $@ $(PDWIN32_BIN)
    3534
    3635
    37 $(TARGET).lib: $(TARGET)exp.def
    38         $(IMPLIB) $(IMPLIBFLAGS) $@ $(TARGET)exp.def
     36$(TARGET).lib: $(TARGET).def
     37        $(IMPLIB) $(IMPLIBFLAGS) $@ $**
    3938        $(CP) $@ $(PDWIN32_LIB)
    4039
    41 $(TARGET)exp.def: $(TARGET).def
    42         $(IMPDEF) $** $@
     40resource.asm: $(TARGET).rc
     41    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     42
     43resource.obj: resource.asm
    4344
    4445
     
    6061    $(PDWIN32_INCLUDE)/os2wrap.h
    6162
    62 asmutil.obj: asmutil.asm
    63 
    6463initterm.obj: initterm.cpp initterm.h
    6564
  • TabularUnified tags/trunk/src/gdi32/initterm.cpp

    r12838 r13230  
    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//******************************************************************************
  • TabularUnified tags/trunk/src/gdi32/makefile

    r13195 r13230  
    1 # $Id: makefile,v 1.18 2000-02-03 18:59:36 sandervl Exp $
     1# $Id: makefile,v 1.19 2000-02-05 01:59:25 sandervl Exp $
    22
    33#
     
    1818CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE)
    1919CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE)
    20 
    21 RC = $(PDWIN32_TOOLS)\wrc
    22 RCFLAGS = -s -I. -I$(CPPMAIN)\include -I$(PDWIN32_INCLUDE) -I$(PDWIN32_INCLUDE)\win
    23 
    2420
    2521TARGET = gdi32
  • TabularUnified tags/trunk/src/imagehlp/initterm.cpp

    r11543 r13230  
    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:00:05 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 IMAGEHLP_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 IMAGEHLP_LibMain(hinstDLL, fdwReason, fImpLoad);
    5259
    53 
     60   case DLL_PROCESS_DETACH:
     61        IMAGEHLP_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   */
     
    8396         /*******************************************************************/
    8497
    85          if(RegisterLxDll(hModule, IMAGEHLP_LibMain, 0) == FALSE)
     98         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    8699                return 0UL;
    87 
    88          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    89          if(rc)
    90                 return 0UL;
    91100
    92101         break;
     
    104113   return 1UL;
    105114}
    106 
    107 
    108 static void APIENTRY cleanup(ULONG ulReason)
    109 {
    110    _ctordtorTerm();
    111    DosExitList(EXLST_EXIT, cleanup);
    112    return ;
    113 }
     115//******************************************************************************
     116//******************************************************************************
  • TabularUnified tags/trunk/src/imagehlp/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.5 2000-01-26 23:19:56 sandervl Exp $
     1# $Id: makefile,v 1.6 2000-02-05 02:00:05 sandervl Exp $
    22
    33#
     
    2222TARGET = imagehlp
    2323
    24 OBJS =  imagehlp.obj internal.obj initterm.obj
     24OBJS =  imagehlp.obj internal.obj initterm.obj resource.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4141        $(IMPDEF) $** $@
    4242
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     45
     46resource.obj: resource.asm
    4347
    4448initterm.obj: initterm.cpp
  • TabularUnified tags/trunk/src/imm32/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.5 2000-01-26 23:19:56 sandervl Exp $
     1# $Id: makefile,v 1.6 2000-02-05 02:00:41 sandervl Exp $
    22
    33#
     
    2222TARGET = imm32
    2323
    24 OBJS =  imm32.obj initterm.obj
     24OBJS =  imm32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    32               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
     31              $(PDWIN32_LIB)/kernel32.lib \
     32              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) 
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
     
    4141        $(IMPDEF) $** $@
    4242
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4345
    44 initterm.obj: initterm.cpp
     46resource.obj: resource.asm
     47
    4548imm32.obj: imm32.cpp
    4649
  • TabularUnified tags/trunk/src/lz32/makefile

    r12927 r13230  
    1 # $Id: makefile,v 1.7 2000-01-06 20:05:46 sandervl Exp $
     1# $Id: makefile,v 1.8 2000-02-05 02:01:38 sandervl Exp $
    22
    33#
     
    2222TARGET = lz32
    2323
    24 OBJS =  lz32.obj initterm.obj
     24OBJS =  lz32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    4545
    4646
     47resource.asm: $(TARGET).rc
     48    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     49
     50resource.obj: resource.asm
     51
    4752lz32.obj: lz32.cpp lz32.h $(PDWIN32_INCLUDE)\win\debugtools.h
    48 initterm.obj: initterm.cpp
    4953
    5054clean:
  • TabularUnified tags/trunk/src/mpr/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.9 2000-01-26 23:19:57 sandervl Exp $
     1# $Id: makefile,v 1.10 2000-02-05 02:02:10 sandervl Exp $
    22
    33#
     
    2222TARGET = mpr
    2323
    24 OBJS =  mpr.obj initterm.obj
     24OBJS =  mpr.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3333              OS2386.LIB $(RTLLIB_O)
     
    4242        $(IMPDEF) $** $@
    4343
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
     48
    4449
    4550mpr.obj: mpr.cpp
    46 initterm.obj: initterm.cpp
    4751
    4852clean:
  • TabularUnified tags/trunk/src/msacm32/initterm.cpp

    r11543 r13230  
    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//******************************************************************************
  • TabularUnified tags/trunk/src/msacm32/makefile

    r13107 r13230  
    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
  • TabularUnified tags/trunk/src/msvfw32/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.4 2000-01-26 23:19:57 sandervl Exp $
     1# $Id: makefile,v 1.5 2000-02-05 02:04:28 sandervl Exp $
    22
    33#
     
    2222TARGET = msvfw32
    2323
    24 OBJS =  msvfw32.obj initterm.obj
     24OBJS =  msvfw32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/gdi32.lib \
    3333              $(PDWIN32_LIB)/winmm.lib \
     
    4242        $(IMPDEF) $** $@
    4343
    44 initterm.obj: initterm.cpp
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
     48
    4549msvfw32.obj: msvfw32.cpp
    4650
  • TabularUnified tags/trunk/src/ole32/makefile

    r12585 r13230  
    3232        hglobalstream.obj \
    3333        initialise.obj \
    34         initterm.obj \
    3534        itemmoniker.obj \
    3635        iunknown.obj \
     
    4847        storage.obj \
    4948        stubs.obj \
    50         taskmem.obj
     49        taskmem.obj resource.obj  $(PDWIN32_LIB)/dllentry.obj
    5150
    5251all: $(TARGET).dll $(ORGTARGET).lib regsvr32.exe
     
    5554$(TARGET).dll: $(OBJS) $(ORGTARGET).def
    5655        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(ORGTARGET).def \
    57               $(PDWIN32_LIB)\pmwinx.lib \
    5856              $(PDWIN32_LIB)\user32.lib \
    5957              $(PDWIN32_LIB)\gdi32.lib \
     
    6462              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    6563        $(CP) $@ $(PDWIN32_BIN)
    66 #              $(PDWIN32_LIB)\ntdll.lib \
    6764
    6865$(ORGTARGET).lib: $(ORGTARGET)exp.def
     
    7269$(ORGTARGET)exp.def: $(ORGTARGET).def
    7370        $(IMPDEF) $** $@
     71
     72resource.asm: $(ORGTARGET).rc
     73    $(RC) $(RCFLAGS) -o resource.asm $(ORGTARGET).rc
     74
     75resource.obj: resource.asm
    7476
    7577.\stubs.obj: \
     
    273275    $(PDWIN32_INCLUDE)/win/debugtools.h \
    274276    $(PDWIN32_INCLUDE)/heapstring.h
    275 
    276 .\initterm.obj: \
    277     .\initterm.cpp
    278277
    279278.\initialise.obj: \
  • TabularUnified tags/trunk/src/oleaut32/initterm.cpp

    r13099 r13230  
    1 /* $Id: initterm.cpp,v 1.5 2000-01-26 11:26:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.6 2000-02-05 02:07:03 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
     
    5155void Hash_Initialise(void);
    5256
    53 /*-------------------------------------------------------------------*/
    54 /* A clean up routine registered with DosExitList must be used if    */
    55 /* runtime calls are required and the runtime is dynamically linked. */
    56 /* This will guarantee that this clean up routine is run before the  */
    57 /* library DLL is terminated.                                        */
    58 /*-------------------------------------------------------------------*/
    59 static void APIENTRY cleanup(ULONG reason);
     57//******************************************************************************
     58//******************************************************************************
     59BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     60{
     61   switch (fdwReason)
     62   {
     63   case DLL_PROCESS_ATTACH:
     64        return TRUE;
    6065
     66   case DLL_THREAD_ATTACH:
     67   case DLL_THREAD_DETACH:
     68        return TRUE;
    6169
     70   case DLL_PROCESS_DETACH:
     71        _ctordtorTerm();
     72        ClosePrivateLogFiles();
     73        return TRUE;
     74   }
     75   return FALSE;
     76}
    6277/****************************************************************************/
    6378/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    93108         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    94109
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          if(RegisterLxDll(hModule, 0, 0) == FALSE)
     110         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    101111                return 0UL;
    102 
    103          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    104          if(rc)
    105                 return 0UL;
    106112
    107113#ifdef DEFAULT_LOGGING_OFF
     
    112118                OpenPrivateLogFiles();
    113119         }
    114 
    115120         Hash_Initialise();
    116 
    117121
    118122         break;
     
    130134   return 1UL;
    131135}
    132 
    133 
    134 static void APIENTRY cleanup(ULONG ulReason)
    135 {
    136    _ctordtorTerm();
    137    ClosePrivateLogFiles();
    138    DosExitList(EXLST_EXIT, cleanup);
    139    return ;
    140 }
     136//******************************************************************************
     137//******************************************************************************
  • TabularUnified tags/trunk/src/oleaut32/makefile

    r13109 r13230  
    1 # $Id: makefile,v 1.13 2000-01-26 23:48:29 sandervl Exp $
     1# $Id: makefile,v 1.14 2000-02-05 02:07:04 sandervl Exp $
    22#
    33# PD-Win32 API
     
    4141        itypeinfo.obj \
    4242        hash.obj \
    43         safearray.obj stubs.obj
     43        safearray.obj stubs.obj resource.obj
    4444
    4545all: $(TARGET).dll $(ORGTARGET).lib
     
    6565        $(IMPDEF) $** $@
    6666
     67resource.asm: $(ORGTARGET).rc
     68    $(RC) $(RCFLAGS) -o resource.asm $(ORGTARGET).rc
     69
     70resource.obj: resource.asm
     71
    6772hash.obj:               hash.cpp oList.h
    6873oList.obj:              oList.cpp oList.h
    6974oleaut32.obj:           oleaut32.cpp oleaut32.h
    70 initterm.obj:           initterm.cpp
     75initterm.obj:           initterm.cpp $(PDWIN32_INCLUDE)\exitlist.h
    7176ole2disp.obj:           ole2disp.cpp oleaut32.h
    7277variant.obj:            variant.cpp parsedt.h
  • TabularUnified tags/trunk/src/olecli32/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.5 2000-01-26 23:19:57 sandervl Exp $
     1# $Id: makefile,v 1.6 2000-02-05 02:07:39 sandervl Exp $
    22
    33#
     
    2222TARGET = olecli32
    2323
    24 OBJS =  olecli32.obj initterm.obj
     24OBJS =  olecli32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4141        $(IMPDEF) $** $@
    4242
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4345
    44 initterm.obj: initterm.cpp
     46resource.obj: resource.asm
     47
    4548olecli32.obj: olecli32.cpp
    4649
  • TabularUnified tags/trunk/src/oledlg/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.5 2000-01-26 23:19:57 sandervl Exp $
     1# $Id: makefile,v 1.6 2000-02-05 02:08:16 sandervl Exp $
    22
    33#
     
    2222TARGET = oledlg
    2323
    24 OBJS =  oledlg.obj initterm.obj
     24OBJS =  oledlg.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4242
    4343
    44 initterm.obj: initterm.cpp
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
     48
    4549oledlg.obj: oledlg.cpp
    4650
  • TabularUnified tags/trunk/src/olesvr32/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.5 2000-01-26 23:19:58 sandervl Exp $
     1# $Id: makefile,v 1.6 2000-02-05 02:08:48 sandervl Exp $
    22
    33#
     
    2222TARGET = olesvr32
    2323
    24 OBJS =  olesvr32.obj initterm.obj
     24OBJS =  olesvr32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4242
    4343
    44 initterm.obj: initterm.cpp
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
     48
    4549olesvr32.obj: olesvr32.cpp
    4650
  • TabularUnified tags/trunk/src/psapi/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.4 2000-01-26 23:19:58 sandervl Exp $
     1# $Id: makefile,v 1.5 2000-02-05 02:09:24 sandervl Exp $
    22
    33#
     
    2222TARGET = psapi
    2323
    24 OBJS =  psapi.obj initterm.obj
     24OBJS =  psapi.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4141        $(IMPDEF) $** $@
    4242
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4345
    44 initterm.obj: initterm.cpp
     46resource.obj: resource.asm
     47
    4548psapi.obj: psapi.cpp
    4649
  • TabularUnified tags/trunk/src/rasapi32/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.5 2000-01-26 23:19:58 sandervl Exp $
     1# $Id: makefile,v 1.6 2000-02-05 02:09:55 sandervl Exp $
    22
    33#
     
    2222TARGET = rasapi32
    2323
    24 OBJS =  rasapi32.obj initterm.obj
     24OBJS =  rasapi32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4242
    4343
    44 initterm.obj: initterm.cpp
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
    4548rasapi32.obj: rasapi32.cpp
    4649
  • TabularUnified tags/trunk/src/shlwapi/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.6 2000-01-26 23:19:59 sandervl Exp $
     1# $Id: makefile,v 1.7 2000-02-05 02:10:50 sandervl Exp $
    22
    33#
     
    2222TARGET = shlwapi
    2323
    24 OBJS =  shlwapi.obj initterm.obj
     24OBJS =  shlwapi.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    32                $(PDWIN32_LIB)/odincrt.lib $(PDWIN32_LIB)/shell32.lib OS2386.LIB $(RTLLIB_O)
     31              $(PDWIN32_LIB)/kernel32.lib \
     32              $(PDWIN32_LIB)/odincrt.lib $(PDWIN32_LIB)/shell32.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
     
    4242
    4343
    44 initterm.obj: initterm.cpp
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
     48
    4549shlwapi.obj: shlwapi.cpp
    4650
  • TabularUnified tags/trunk/src/tapi32/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.9 2000-01-26 23:19:59 sandervl Exp $
     1# $Id: makefile,v 1.10 2000-02-05 02:11:22 sandervl Exp $
    22
    33#
     
    2222TARGET = tapi32
    2323
    24 OBJS =  tapi32.obj initterm.obj
     24OBJS =  tapi32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3333              OS2386.LIB $(RTLLIB_O)
     
    4444
    4545
     46resource.asm: $(TARGET).rc
     47    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     48
     49resource.obj: resource.asm
     50
    4651tapi32.obj: tapi32.cpp tapi32.h
    47 initterm.obj: initterm.cpp
    48 
    4952
    5053
  • TabularUnified tags/trunk/src/version/makefile

    r12930 r13230  
    1 # $Id: makefile,v 1.9 2000-01-06 20:10:07 sandervl Exp $
     1# $Id: makefile,v 1.10 2000-02-05 02:13:02 sandervl Exp $
    22
    33#
     
    2222TARGET = version
    2323
    24 OBJS =  version.obj initterm.obj install.obj info.obj
     24OBJS =  version.obj resource.obj install.obj info.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def $(TARGET)exp.def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3333              $(PDWIN32_LIB)/crtdll.lib \
     
    4343        $(CP) $@ $(PDWIN32_LIB)
    4444
     45resource.asm: $(TARGET).rc
     46    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     47
     48resource.obj: resource.asm
     49
    4550
    4651version.obj: version.cpp
    47 initterm.obj: initterm.cpp
    4852install.obj: install.c
    4953info.obj: info.c
  • TabularUnified tags/trunk/src/wing32/initterm.cpp

    r12234 r13230  
    1 /* $Id: initterm.cpp,v 1.1 1999-11-08 22:10:00 hugh Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-02-05 02:13: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*/
    3738#include "wing32impl.h"
    38 #include "initterm.h"
    3939
    4040extern "C" {
    4141void CDECL _ctordtorInit( void );
    4242void CDECL _ctordtorTerm( void );
     43
     44 //Win32 resource table (produced by wrc)
     45 extern DWORD _Resource_PEResTab;
    4346}
     47//******************************************************************************
     48//******************************************************************************
     49BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     50{
     51   switch (fdwReason)
     52   {
     53   case DLL_PROCESS_ATTACH:
     54        return TRUE;
    4455
    45 char wing32Path[CCHMAXPATH] = "";
     56   case DLL_THREAD_ATTACH:
     57   case DLL_THREAD_DETACH:
     58        return TRUE;
    4659
    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);
    54 
    55 
     60   case DLL_PROCESS_DETACH:
     61        _ctordtorTerm();
     62        return TRUE;
     63   }
     64   return FALSE;
     65}
    5666/****************************************************************************/
    5767/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8090        _ctordtorInit();
    8191
    82         DosQueryModuleName(hModule, CCHMAXPATH, wing32Path);
    83         char *endofpath = strrchr(wing32Path, '\\');
    84         if(endofpath)
    85           *(endofpath+1) = 0;
    86 
    8792        CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    88 
    89          /*******************************************************************/
    90          /* A DosExitList routine must be used to clean up if runtime calls */
    91          /* are required and the runtime is dynamically linked.             */
    92          /*******************************************************************/
    93 
    94         if(RegisterLxDll(hModule, 0, 0) == FALSE)
    95           return 0UL;
    9693
    9794        if(!InitWing32())
    9895          return 0UL;
    9996
    100         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    101         if(rc)
     97        if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    10298          return 0UL;
    10399
     
    116112   return 1UL;
    117113}
    118 
    119 
    120 static void APIENTRY cleanup(ULONG ulReason)
    121 {
    122    _ctordtorTerm();
    123    DosExitList(EXLST_EXIT, cleanup);
    124    return ;
    125 }
  • TabularUnified tags/trunk/src/wing32/makefile

    r12613 r13230  
    1919TARGET = wing32
    2020
    21 OBJS =   initterm.obj wing32.obj
     21OBJS =   initterm.obj wing32.obj resource.obj
    2222
    2323LIBS =  $(PDWIN32_LIB)\user32.lib $(PDWIN32_LIB)\gdi32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
     
    4545
    4646
    47 initterm.obj: initterm.cpp initterm.h wing32impl.h
     47resource.asm: $(TARGET).rc
     48    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     49
     50resource.obj: resource.asm
     51
     52initterm.obj: initterm.cpp wing32impl.h
    4853
    4954clean:
  • TabularUnified tags/trunk/src/wininet/makefile

    r13205 r13230  
    1 # $Id: makefile,v 1.2 2000-02-03 22:50:28 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:14:10 sandervl Exp $
    22
    33#
     
    2222TARGET = wininet
    2323
    24 OBJS =  wininet.obj initterm.obj ftp.obj utility.obj internet.obj
     24OBJS =  wininet.obj resource.obj ftp.obj utility.obj internet.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3333              $(PDWIN32_LIB)/wsock32.lib OS2386.LIB $(RTLLIB_O)
     
    4242        $(IMPDEF) $** $@
    4343
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
    4448
    4549wininet.obj: wininet.cpp
    46 initterm.obj: initterm.cpp
    4750ftp.obj: ftp.c internet.h
    4851utility.obj: utility.c internet.h
  • TabularUnified tags/trunk/src/winmm/initterm.cpp

    r11733 r13230  
    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//******************************************************************************
  • TabularUnified tags/trunk/src/winmm/makefile

    r11992 r13230  
    1 # $Id: makefile,v 1.12 1999-10-22 18:09:16 sandervl Exp $
     1# $Id: makefile,v 1.13 2000-02-05 02:16:21 sandervl Exp $
    22
    33#
     
    2525        wavein.obj auxiliary.obj auxos2.obj mixer.obj \
    2626        midi.obj irtmidi.obj midistrm.obj initterm.obj mci.obj joy.obj \
    27         mmio.obj driver.obj playsound.obj joyos2.obj
     27        mmio.obj driver.obj playsound.obj joyos2.obj resource.obj
    2828
    2929
     
    4848        $(IMPDEF) $** $@
    4949
     50
     51resource.asm: $(TARGET).rc
     52    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     53
     54resource.obj: resource.asm
    5055
    5156driver.obj:     driver.cpp
  • TabularUnified tags/trunk/src/winmm/mcianim/makefile

    r13039 r13230  
    1 # $Id: makefile,v 1.2 2000-01-15 22:02:48 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:16:22 sandervl Exp $
    22
    33#
     
    2121TARGET = mcianim
    2222
    23 OBJS =  mcianim.obj initterm.obj
     23OBJS =  mcianim.obj $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140mcianim.obj: mcianim.cpp
    4241
  • TabularUnified tags/trunk/src/winmm/mciavi32/makefile

    r13039 r13230  
    1 # $Id: makefile,v 1.2 2000-01-15 22:02:49 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:16:22 sandervl Exp $
    22
    33#
     
    2121TARGET = mciavi32
    2222
    23 OBJS =  mciavi32.obj initterm.obj
     23OBJS =  mciavi32.obj  $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140mciavi32.obj: mciavi32.cpp
    4241
    4342clean:
    44         $(RM) *.obj *.lib *.dll *~ *.map *.pch
     43        $(RM) *.obj *.lib *.dll *.map *.pch
    4544        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    4645        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • TabularUnified tags/trunk/src/winmm/mcicda/makefile

    r13056 r13230  
    1 # $Id: makefile,v 1.1 2000-01-18 20:25:10 sandervl Exp $
     1# $Id: makefile,v 1.2 2000-02-05 02:16:23 sandervl Exp $
    22
    33#
     
    2121TARGET = mcicda
    2222
    23 OBJS =  mcicda.obj cdrom.obj initterm.obj
     23OBJS =  mcicda.obj cdrom.obj  $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140mcicda.obj: mcicda.cpp
    4241cdrom.obj: cdrom.cpp
  • TabularUnified tags/trunk/src/winmm/mciseq/makefile

    r13039 r13230  
    1 # $Id: makefile,v 1.2 2000-01-15 22:02:49 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:16:24 sandervl Exp $
    22
    33#
     
    2121TARGET = mciseq
    2222
    23 OBJS =  mciseq.obj initterm.obj
     23OBJS =  mciseq.obj  $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140mciseq.obj: mciseq.cpp
    4241
  • TabularUnified tags/trunk/src/winmm/mciwave/makefile

    r13039 r13230  
    1 # $Id: makefile,v 1.2 2000-01-15 22:02:49 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:16:24 sandervl Exp $
    22
    33#
     
    2121TARGET = mciwave
    2222
    23 OBJS =  mciwave.obj initterm.obj
     23OBJS =  mciwave.obj  $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140mciwave.obj: mciwave.cpp
    4241
    4342clean:
    44         $(RM) *.obj *.lib *.dll *~ *.map *.pch
     43        $(RM) *.obj *.lib *.dll *.map *.pch
    4544        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    4645        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • TabularUnified tags/trunk/src/winmm/midimap/makefile

    r13039 r13230  
    1 # $Id: makefile,v 1.2 2000-01-15 22:02:50 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:16:25 sandervl Exp $
    22
    33#
     
    2121TARGET = midimap
    2222
    23 OBJS =  midimap.obj initterm.obj
     23OBJS =  midimap.obj  $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140midimap.obj: midimap.cpp
    4241
    4342clean:
    44         $(RM) *.obj *.lib *.dll *~ *.map *.pch
     43        $(RM) *.obj *.lib *.dll *.map *.pch
    4544        $(RM) $(PDWIN32_BIN)\$(TARGET).dll
    4645        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • TabularUnified tags/trunk/src/winmm/wavemap/makefile

    r13055 r13230  
    1 # $Id: makefile,v 1.2 2000-01-18 20:24:02 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-02-05 02:16:26 sandervl Exp $
    22
    33#
     
    2121TARGET = msacm32
    2222
    23 OBJS =  msacm32.obj initterm.obj
     23OBJS =  msacm32.obj  $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).drv $(TARGET).lib
     
    3838
    3939
    40 initterm.obj: initterm.cpp
    4140msacm32.obj: msacm32.cpp
    4241
    4342clean:
    44         $(RM) *.obj *.lib *.drv *~ *.map *.pch
     43        $(RM) *.obj *.lib *.drv *.map *.pch
    4544        $(RM) $(PDWIN32_BIN)\$(TARGET).drv
    4645        $(RM) $(PDWIN32_LIB)\$(TARGET).lib
  • TabularUnified tags/trunk/src/winspool/makefile

    r13107 r13230  
    1 # $Id: makefile,v 1.9 2000-01-26 23:20:00 sandervl Exp $
     1# $Id: makefile,v 1.10 2000-02-05 02:17:11 sandervl Exp $
    22
    33#
     
    2222TARGET = winspool
    2323
    24 OBJS =  winspool.obj initterm.obj
     24OBJS =  winspool.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    3030        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     31              $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/pmwinx.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3333              OS2386.LIB $(RTLLIB_O)
     
    4242        $(IMPDEF) $** $@
    4343
     44resource.asm: $(TARGET).rc
     45    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     46
     47resource.obj: resource.asm
    4448
    4549winspool.obj: winspool.cpp
    46 initterm.obj: initterm.cpp
    4750
    4851
  • TabularUnified tags/trunk/src/wnaspi32/makefile

    r12621 r13230  
    1 # $Id: makefile,v 1.4 1999-12-09 01:00:27 bird Exp $
     1# $Id: makefile,v 1.5 2000-02-05 02:17:42 sandervl Exp $
    22
    33#
     
    2121TARGET = wnaspi32
    2222
    23 OBJS =  odinaspi.obj winaspi32.obj initterm.obj
     23OBJS =  odinaspi.obj winaspi32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    2929        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    30               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     30              $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) \
    3232              $(PDWIN32_LIB)/advapi32.lib
     
    4141        $(IMPDEF) $** $@
    4242
     43resource.asm: $(TARGET).rc
     44    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    4345
    44 initterm.obj:  initterm.cpp
     46resource.obj: resource.asm
     47
    4548ainaspi32.obj: wnaspi32.cpp odinaspi.h srbos2.h
    4649odinaspi.obj:  odinaspi.cpp odinaspi.h srbos2.h
  • TabularUnified tags/trunk/src/wnetap32/makefile

    r12620 r13230  
    1 # $Id: makefile,v 1.8 1999-12-09 00:56:54 bird Exp $
     1# $Id: makefile,v 1.9 2000-02-05 02:19:02 sandervl Exp $
    22
    33#
     
    2121
    2222TARGET = wnetap32
     23ORGTARGET = netapi32
    2324
    24 OBJS =  wnetap32.obj initterm.obj
     25OBJS =  wnetap32.obj resource.obj $(PDWIN32_LIB)/dllentry.obj
    2526
    26 all: $(TARGET).dll $(TARGET).lib
     27all: $(TARGET).dll $(ORGTARGET).lib
    2728
    2829
    29 $(TARGET).dll: $(OBJS) $(TARGET).def
    30         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    31               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
     30$(TARGET).dll: $(OBJS) $(ORGTARGET).def
     31        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(ORGTARGET).def \
     32              $(PDWIN32_LIB)/kernel32.lib \
    3233              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3334              OS2386.LIB $(RTLLIB_O)
     
    3536
    3637
    37 $(TARGET).lib: $(TARGET)exp.def
     38$(ORGTARGET).lib: $(ORGTARGET)exp.def
    3839        $(IMPLIB) $(IMPLIBFLAGS) $@ $**
    3940        $(CP) $@ $(PDWIN32_LIB)
    4041
    41 $(TARGET)exp.def: $(TARGET).def
     42$(ORGTARGET)exp.def: $(ORGTARGET).def
    4243    $(IMPDEF) $** $@
    4344
     45resource.asm: $(ORGTARGET).rc
     46    $(RC) $(RCFLAGS) -o resource.asm $(ORGTARGET).rc
     47
     48resource.obj: resource.asm
    4449
    4550wnetap32.obj: wnetap32.cpp
    46 initterm.obj: initterm.cpp
    47 
    4851
    4952clean:
  • TabularUnified tags/trunk/src/wsock32/makefile

    r12599 r13230  
    1 # $Id: makefile,v 1.15 1999-12-07 20:29:15 achimha Exp $
     1# $Id: makefile,v 1.16 2000-02-05 02:19:44 sandervl Exp $
    22
    33#
     
    2121TARGET = wsock32
    2222
    23 OBJS =  wsock32.obj initterm.obj unknown.obj relaywin.obj
     23OBJS =  wsock32.obj resource.obj unknown.obj relaywin.obj $(PDWIN32_LIB)/dllentry.obj
    2424
    2525all: $(TARGET).dll $(TARGET).lib
     
    2929        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              pmwsock.lib $(PDWIN32_LIB)\kernel32.lib \
    31               $(PDWIN32_LIB)\user32.lib \
     31              $(PDWIN32_LIB)\user32.lib  \
    3232              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    3333        $(CP) $@ $(PDWIN32_BIN)
     
    4040    $(IMPDEF) $** $@
    4141
     42resource.asm: $(TARGET).rc
     43    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     44
     45resource.obj: resource.asm
     46
    4247wsock32.obj: wsock32.cpp   relaywin.h wsock32.h
    4348unknown.obj: unknown.cpp   wsock32.h
    44 initterm.obj: initterm.cpp
    4549relaywin.obj: relaywin.cpp relaywin.h wsock32.h
    4650
Note: See TracChangeset for help on using the changeset viewer.