Changeset 4256 for trunk/src/kernel32/HandleManager.cpp
- Timestamp:
- Sep 13, 2000, 11:11:00 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r4197 r4256 1 /* $Id: HandleManager.cpp,v 1.4 8 2000-09-05 20:35:38sandervl Exp $ */1 /* $Id: HandleManager.cpp,v 1.49 2000-09-13 21:10:56 sandervl Exp $ */ 2 2 3 3 /* … … 50 50 #include "HandleManager.H" 51 51 #include "HMDevice.h" 52 #include "HMDisk.h" 52 53 #include "HMOpen32.h" 53 54 #include "HMEvent.h" … … 128 129 HMDeviceHandler *pHMEvent; /* static instances of subsystems */ 129 130 HMDeviceHandler *pHMFile; 131 HMDeviceHandler *pHMDisk; 130 132 HMDeviceHandler *pHMMutex; 131 133 HMDeviceHandler *pHMSemaphore; … … 172 174 PHMDEVICE pHMDevice; /* iterator over the device table */ 173 175 174 if (pszDeviceName != NULL) 176 if (pszDeviceName != NULL) { 175 177 for (pHMDevice = TabWin32Devices; /* loop over all devices in the table */ 176 178 pHMDevice != NULL; … … 181 183 return (pHMDevice->pDeviceHandler); /* OK, we've found our device */ 182 184 } 185 } 186 int namelength = strlen(pszDeviceName); 187 188 //SvL: \\.\x: -> drive x (i.e. \\.\C:) 189 // \\.\PHYSICALDRIVEn -> drive n (n>=0) 190 if((strncmp(pszDeviceName, "\\\\.\\", 4) == 0) && 191 namelength == 6 && pszDeviceName[5] == ':') 192 { 193 return HMGlobals.pHMDisk; 194 } 195 if((strncmp(pszDeviceName, "\\\\.\\PHYSICALDRIVE", 17) == 0) && namelength == 18) { 196 return HMGlobals.pHMDisk; 197 } 183 198 184 199 return (HMGlobals.pHMOpen32); /* haven't found anything, return default */ … … 359 374 HMGlobals.pHMEvent = new HMDeviceEventClass("\\\\EVENT\\"); 360 375 HMGlobals.pHMFile = new HMDeviceFileClass("\\\\FILE\\"); 376 HMGlobals.pHMDisk = new HMDeviceDiskClass("\\\\DISK\\"); 361 377 HMGlobals.pHMMutex = new HMDeviceMutexClass("\\\\MUTEX\\"); 362 378 HMGlobals.pHMSemaphore = new HMDeviceSemaphoreClass("\\\\SEM\\"); … … 387 403 /* @@@PH we could deallocate the device list here */ 388 404 389 delete HMGlobals.pHMOpen32; 390 delete HMGlobals.pHMEvent; 391 delete HMGlobals.pHMFile; 392 delete HMGlobals.pHMMutex; 393 delete HMGlobals.pHMSemaphore; 394 delete HMGlobals.pHMFileMapping; 395 delete HMGlobals.pHMComm; 405 if(HMGlobals.pHMOpen32) 406 delete HMGlobals.pHMOpen32; 407 if(HMGlobals.pHMEvent) 408 delete HMGlobals.pHMEvent; 409 if(HMGlobals.pHMFile) 410 delete HMGlobals.pHMFile; 411 if(HMGlobals.pHMMutex) 412 delete HMGlobals.pHMMutex; 413 if(HMGlobals.pHMSemaphore) 414 delete HMGlobals.pHMSemaphore; 415 if(HMGlobals.pHMFileMapping) 416 delete HMGlobals.pHMFileMapping; 417 if(HMGlobals.pHMComm) 418 delete HMGlobals.pHMComm; 419 if(HMGlobals.pHMToken) 420 delete HMGlobals.pHMToken; 421 if(HMGlobals.pHMThread) 422 delete HMGlobals.pHMThread; 423 if(HMGlobals.pHMNamedPipe) 424 delete HMGlobals.pHMNamedPipe; 425 if(HMGlobals.pHMDisk) 426 delete HMGlobals.pHMDisk; 396 427 397 428 return (NO_ERROR);
Note:
See TracChangeset
for help on using the changeset viewer.