Changeset 7474 for trunk/src/kernel32/HandleManager.cpp
- Timestamp:
- Nov 29, 2001, 12:33:37 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r7472 r7474 1 /* $Id: HandleManager.cpp,v 1.7 8 2001-11-28 15:45:45 sandervlExp $ */1 /* $Id: HandleManager.cpp,v 1.79 2001-11-28 23:33:34 phaller Exp $ */ 2 2 3 3 /* … … 432 432 433 433 HMGlobals.fIsInitialized = TRUE; /* OK, done */ 434 434 435 #if 1 436 //This is a very bad idea. \\\\.\\NTICE -> NTICE, if the file exits, then 437 //it will open the file instead of the device driver 438 /* add standard symbolic links first, so local symbolic links in the 439 * device handlers get precedence over the default here. 440 * 441 * Device handlers are supposed to place the appropriate 442 * symbolic links such as "\\.\\COM1", "COM1" 443 * 444 * - "\\.\f:\temp\readme.txt" is a valid file 445 * - "com1" is a valid device in case serial port 1 exists, 446 * otherwise it'd be a valid file. 447 * - "\\.\filename" is the only misleading case (to be verified) 448 * 449 * Note: 450 * the Open32 "device" definately MUST be the last device to be 451 * asked to accept the specified name. 452 */ 453 { 454 // strings are placed in read-only segment 455 PSZ pszDrive = strdup("\\\\.\\x:"); 456 PSZ pszDrive2 = strdup("\\\\.\\x:"); 457 for (char ch = 'A'; ch <= 'Z'; ch++) 458 { 459 pszDrive[4] = ch; 460 pszDrive2[4] = ch; 461 HandleNamesAddSymbolicLink(pszDrive, pszDrive+4); 462 HandleNamesAddSymbolicLink(pszDrive2, pszDrive2+4); 463 } 464 free(pszDrive); 465 free(pszDrive2); 466 HandleNamesAddSymbolicLink("\\\\?\\UNC\\", "\\\\"); 467 } 468 #endif 469 435 470 /* copy standard handles from OS/2's Open32 Subsystem */ 436 471 HMGlobals.pHMStandard = new HMDeviceStandardClass("\\\\STANDARD_HANDLE\\"); … … 453 488 HMGlobals.pHMMailslot = new HMMailslotClass("\\MAILSLOT\\"); 454 489 HMGlobals.pHMParPort = new HMDeviceParPortClass("\\\\LPT\\"); 455 456 #if 0457 //This is a very bad idea. \\\\.\\NTICE -> NTICE, if the file exits, then458 //it will open the file instead of the device driver459 /* add standard symbolic links */460 HandleNamesAddSymbolicLink("\\\\.\\", "");461 #endif462 490 } 463 491 return (NO_ERROR); … … 1070 1098 { 1071 1099 TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE; 1072 SetLastError(rc); /* Hehe, OS/2 and NT are pretty compatible :) */ 1100 1101 1102 // Note: 1103 // device handlers have to return an Win32-style error code 1104 // from CreateFile() ! 1105 SetLastError(rc); 1073 1106 return (INVALID_HANDLE_VALUE); /* signal error */ 1074 1107 }
Note:
See TracChangeset
for help on using the changeset viewer.