Changeset 780 for trunk/src/kernel32
- Timestamp:
- Sep 1, 1999, 9:12:23 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r769 r780 1 /* $Id: HandleManager.cpp,v 1. 19 1999-08-31 23:48:36 phaller Exp $ */1 /* $Id: HandleManager.cpp,v 1.20 1999-09-01 19:12:16 phaller Exp $ */ 2 2 3 3 /* … … 83 83 struct _HMDEVICE *pNext; /* pointer to next device in chain */ 84 84 85 PSZpszDeviceName; /* name or alias of the pseudo-device */85 LPSTR pszDeviceName; /* name or alias of the pseudo-device */ 86 86 HMDeviceHandler *pDeviceHandler; /* handler for this pseudo-device */ 87 87 } HMDEVICE, *PHMDEVICE; … … 133 133 134 134 /* get appropriate device handler by the device name */ 135 static HMDeviceHandler* _Optlink _HMDeviceFind( PSZpszDeviceName);135 static HMDeviceHandler* _Optlink _HMDeviceFind(LPSTR pszDeviceName); 136 136 137 137 /* get next free handle from the handle table */ … … 156 156 *****************************************************************************/ 157 157 158 static HMDeviceHandler *_HMDeviceFind ( PSZpszDeviceName)158 static HMDeviceHandler *_HMDeviceFind (LPSTR pszDeviceName) 159 159 { 160 160 PHMDEVICE pHMDevice; /* iterator over the device table */ … … 247 247 *****************************************************************************/ 248 248 249 DWORD HMDeviceRegister( PSZpszDeviceName,249 DWORD HMDeviceRegister(LPSTR pszDeviceName, 250 250 HMDeviceHandler *pDeviceHandler) 251 251 { … … 767 767 else 768 768 { 769 pDeviceHandler = _HMDeviceFind(( PSZ)lpFileName);/* find device */769 pDeviceHandler = _HMDeviceFind((LPSTR)lpFileName); /* find device */ 770 770 771 771 if (NULL == pDeviceHandler) /* this name is unknown to us */ … … 900 900 901 901 902 pDeviceHandler = _HMDeviceFind(( PSZ)lpFileName);/* find device */902 pDeviceHandler = _HMDeviceFind((LPSTR)lpFileName); /* find device */ 903 903 if (NULL == pDeviceHandler) /* this name is unknown to us */ 904 904 { -
trunk/src/kernel32/hmdevice.cpp
r690 r780 1 /* $Id: hmdevice.cpp,v 1. 7 1999-08-25 14:27:05 sandervlExp $ */1 /* $Id: hmdevice.cpp,v 1.8 1999-09-01 19:12:17 phaller Exp $ */ 2 2 3 3 /* … … 18 18 *****************************************************************************/ 19 19 20 #include <os2win.h> 20 #include <odin.h> 21 #include <win32type.h> 22 #include <misc.h> 21 23 #include "HandleManager.h" 22 24 #include "HMDevice.h" … … 27 29 *****************************************************************************/ 28 30 31 #ifndef ERROR_INVALID_FUNCTION 32 #define ERROR_INVALID_FUNCTION 1 33 #endif 29 34 30 35 /***************************************************************************** … … 95 100 * Name : HMDeviceHandler::DuplicateHandle 96 101 * Purpose : dummy version 97 * Parameters: 102 * Parameters: 98 103 * various parameters as required 99 104 * Variables : -
trunk/src/kernel32/hmdevice.h
r690 r780 1 /* $Id: hmdevice.h,v 1. 8 1999-08-25 14:27:06 sandervlExp $ */1 /* $Id: hmdevice.h,v 1.9 1999-09-01 19:12:17 phaller Exp $ */ 2 2 3 3 /* … … 288 288 289 289 /* register a new device with the handle manager */ 290 DWORD HMDeviceRegister( PSZpszDeviceName,290 DWORD HMDeviceRegister(LPSTR pszDeviceName, 291 291 HMDeviceHandler *pDeviceHandler); 292 292 -
trunk/src/kernel32/virtual.cpp
r712 r780 1 /* $Id: virtual.cpp,v 1.1 1 1999-08-27 16:51:01 sandervlExp $ */1 /* $Id: virtual.cpp,v 1.12 1999-09-01 19:12:18 phaller Exp $ */ 2 2 3 3 /* … … 50 50 * See CreateFileMapping32A 51 51 */ 52 HANDLE WINAPI CreateFileMappingW( HFILE hFile, LPSECURITY_ATTRIBUTES attr, 53 DWORD protect, DWORD size_high, 52 HANDLE WINAPI CreateFileMappingW( HFILE hFile, LPSECURITY_ATTRIBUTES attr, 53 DWORD protect, DWORD size_high, 54 54 DWORD size_low, LPCWSTR name ) 55 55 { … … 107 107 DWORD offset_low, /* [in] Low-order 32 bits of file offset */ 108 108 DWORD count /* [in] Number of bytes to map */ 109 ) 109 ) 110 110 { 111 111 return MapViewOfFileEx( mapping, access, offset_high, … … 129 129 DWORD count, /* [in] Number of bytes to map */ 130 130 LPVOID addr /* [in] Suggested starting address for mapped view */ 131 ) 131 ) 132 132 { 133 133 return HMMapViewOfFileEx(handle, access, offset_high, offset_low, count, addr); … … 146 146 LPCVOID base, /* [in] Start address of byte range to flush */ 147 147 DWORD cbFlush /* [in] Number of bytes in range */ 148 ) 148 ) 149 149 { 150 150 Win32MemMap *map; … … 177 177 */ 178 178 BOOL WINAPI UnmapViewOfFile(LPVOID addr /* [in] Address where mapped view begins */ 179 ) 179 ) 180 180 { 181 181 Win32MemMap *map; … … 201 201 * 202 202 * Helper function to map a file to memory: 203 * name - file name 203 * name - file name 204 204 * [RETURN] ptr - pointer to mapped file 205 205 */ … … 208 208 HANDLE hFile, hMapping = -1; 209 209 210 hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ, NULL, 210 hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ, NULL, 211 211 OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); 212 212 if (hFile != INVALID_HANDLE_VALUE) … … 226 226 * 227 227 * Helper function to map a file to memory: 228 * name - file name 228 * name - file name 229 229 * [RETURN] ptr - pointer to mapped file 230 230 */ … … 233 233 HANDLE hFile, hMapping = -1; 234 234 235 hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL, 235 hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL, 236 236 OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); 237 237 if (hFile != INVALID_HANDLE_VALUE) … … 254 254 PVOID Address = lpvAddress; 255 255 ULONG flag = 0, base; 256 APIRETrc;256 DWORD rc; 257 257 258 258 dprintf(("VirtualAlloc at %X; %d bytes, fAlloc %d, fProtect %d\n", (int)lpvAddress, cbSize, fdwAllocationType, fdwProtect)); … … 360 360 BOOL WIN32API VirtualFree(LPVOID lpvAddress, DWORD cbSize, DWORD FreeType) 361 361 { 362 APIRETrc;362 DWORD rc; 363 363 364 364 dprintf(("VirtualFree at %d; %d bytes, freetype %d\n", (int)lpvAddress, cbSize, FreeType)); … … 390 390 DWORD *pfdwOldProtect) 391 391 { 392 APIRETrc;392 DWORD rc; 393 393 ULONG pageFlags = 0; 394 394 int npages; … … 460 460 { 461 461 ULONG cbRangeSize, dAttr; 462 APIRETrc;462 DWORD rc; 463 463 464 464 if(lpvAddress == NULL || pmbiBuffer == NULL || cbLength == 0) { 465 465 return 0; 466 466 } 467 467 468 468 cbRangeSize = cbLength & ~0xFFF; 469 469 if(cbLength & 0xFFF) {
Note:
See TracChangeset
for help on using the changeset viewer.