Changeset 9698 for trunk/src/ddraw/initterm.cpp
- Timestamp:
- Jan 21, 2003, 12:20:36 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/initterm.cpp
r6646 r9698 1 /* $Id: initterm.cpp,v 1. 19 2001-09-05 12:50:39 birdExp $1 /* $Id: initterm.cpp,v 1.20 2003-01-21 11:20:35 sandervl Exp $ 2 2 * 3 3 * DLL entry point … … 40 40 41 41 42 extern "C" {43 //Win32 resource table (produced by wrc)44 extern DWORD _Resource_PEResTab;45 }46 47 char ddrawPath[CCHMAXPATH] = "";48 static HMODULE dllHandle = 0;49 50 42 static void APIENTRY cleanup(ULONG ulReason); 51 43 … … 82 74 ulFlag) 83 75 { 76 APIRET rc; 84 77 85 78 /*-------------------------------------------------------------------------*/ … … 92 85 case 0 : 93 86 { 94 APIRET rc;95 96 87 #ifdef __IBMCPP__ 97 88 ctordtorInit(); 98 89 #endif 99 DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath);100 char *endofpath = strrchr(ddrawPath, '\\');101 if (endofpath)102 *(endofpath+1) = '\0';103 90 104 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 105 106 dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab, 107 DDRAW_MAJORIMAGE_VERSION, DDRAW_MINORIMAGE_VERSION, 108 IMAGE_SUBSYSTEM_WINDOWS_GUI); 109 if (dllHandle == 0) 110 return 0UL; 111 91 #ifdef FULLSCREEN_DDRAW 112 92 rc = DosExitList(EXITLIST_NONCOREDLL | EXLST_ADD, cleanup); 113 93 if (rc) 114 94 return 0UL; 95 #endif 115 96 97 rc = inittermDDraw(hModule, ulFlag); 116 98 break; 117 99 } 118 100 case 1 : 119 if(dllHandle) { 120 UnregisterLxDll(dllHandle); 121 } 101 #ifdef __IBMCPP__ 102 ctordtorTerm(); 103 #endif 104 105 rc = inittermDDraw(hModule, ulFlag); 122 106 break; 123 107 default : … … 128 112 /* A non-zero value must be returned to indicate success. */ 129 113 /***********************************************************/ 130 return 1UL;114 return rc; 131 115 } 132 116 //****************************************************************************** 133 117 //****************************************************************************** 134 118 #ifdef FULLSCREEN_DDRAW 135 119 static void APIENTRY cleanup(ULONG ulReason) 136 120 { … … 143 127 //****************************************************************************** 144 128 //****************************************************************************** 129 #endif
Note:
See TracChangeset
for help on using the changeset viewer.