Changeset 2650 for trunk/src/ddraw
- Timestamp:
 - Feb 5, 2000, 3:19:44 AM (26 years ago)
 - Location:
 - trunk/src/ddraw
 - Files:
 - 
      
- 1 added
 - 2 edited
 
- 
          
  ddraw.rc (added)
 - 
          
  initterm.cpp (modified) (5 diffs)
 - 
          
  makefile (modified) (4 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/src/ddraw/initterm.cpp
r1502 r2650 1 /* $Id: initterm.cpp,v 1.1 1 1999-10-28 22:39:21 hughExp $ */1 /* $Id: initterm.cpp,v 1.12 2000-02-05 01:55:52 sandervl Exp $ */ 2 2 3 3 /* … … 33 33 #include <odin.h> 34 34 #include <win32type.h> 35 #include <winconst.h> 35 36 #include <odinlx.h> 36 37 #include <misc.h> /*PLF Wed 98-03-18 23:18:15*/ 37 #include "initterm.h"38 38 39 39 extern "C" { 40 40 void CDECL _ctordtorInit( void ); 41 41 void CDECL _ctordtorTerm( void ); 42 43 //Win32 resource table (produced by wrc) 44 extern DWORD _Resource_PEResTab; 42 45 } 43 46 44 47 char ddrawPath[CCHMAXPATH] = ""; 45 48 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 //****************************************************************************** 51 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 52 { 53 switch (fdwReason) 54 { 55 case DLL_PROCESS_ATTACH: 56 return TRUE; 53 57 58 case DLL_THREAD_ATTACH: 59 case DLL_THREAD_DETACH: 60 return TRUE; 54 61 62 case DLL_PROCESS_DETACH: 63 _ctordtorTerm(); 64 return TRUE; 65 } 66 return FALSE; 67 } 55 68 /****************************************************************************/ 56 69 /* _DLL_InitTerm is the function that gets called by the operating system */ … … 78 91 _ctordtorInit(); 79 92 80 DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath);93 DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath); 81 94 char *endofpath = strrchr(ddrawPath, '\\'); 82 95 if(endofpath) *(endofpath+1) = 0; … … 84 97 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 85 98 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; 97 101 98 102 break; 99 103 } 100 104 case 1 : 101 UnregisterLxDll(hModule);105 UnregisterLxDll(hModule); 102 106 break; 103 107 default : … … 110 114 return 1UL; 111 115 } 112 113 114 static void APIENTRY cleanup(ULONG ulReason) 115 { 116 _ctordtorTerm(); 117 DosExitList(EXLST_EXIT, cleanup); 118 return ; 119 } 116 //****************************************************************************** 117 //******************************************************************************  - 
      
trunk/src/ddraw/makefile
r2638 r2650 1 # $Id: makefile,v 1.1 7 2000-02-04 19:31:26 hughExp $1 # $Id: makefile,v 1.18 2000-02-05 01:55:52 sandervl Exp $ 2 2 # 3 3 # ddraw.dll makefile … … 13 13 PDWIN32_LIB = ..\..\lib 14 14 PDWIN32_BIN = ..\..\bin 15 PDWIN32_TOOLS = ..\..\tools\bin 15 16 16 17 17 18 !include $(PDWIN32_INCLUDE)/pdwin32.mk 19 18 20 ASFLAGS = -Sc -Sv:ALP 19 21 … … 25 27 OBJS = ddraw.obj os2ddraw.obj os2clipper.obj os2d3d.obj iccio1.obj asmutil.obj\ 26 28 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 28 30 29 31 30 32 LIBS = $(PDWIN32_LIB)\pmwinx.lib $(PDWIN32_LIB)\advapi32.lib $(PDWIN32_LIB)\gdi32.lib \ 31 33 $(PDWIN32_LIB)\comctl32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\odincrt.lib \ 32 $(PDWIN32_LIB)\user32.lib $(PDWIN32_LIB)\ole32.libmmpm2.lib OS2386.LIB $(RTLLIB_O)34 $(PDWIN32_LIB)\user32.lib mmpm2.lib OS2386.LIB $(RTLLIB_O) 33 35 34 36 all: $(TARGET).dll $(TARGET).lib … … 89 91 $(PDWIN32_INCLUDE)\win\d3d.h 90 92 93 resource.asm: $(TARGET).rc 94 $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc 95 96 resource.obj: resource.asm 97 91 98 rectangle.obj: rectangle.cpp rectangle.h 92 99 93 initterm.obj: initterm.cpp initterm.h 100 initterm.obj: initterm.cpp initterm.h $(PDWIN32_INCLUDE)\exitlist.h 94 101 95 102 os2util.obj: os2util.cpp os2util.h  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  