Changeset 21406 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Aug 5, 2010, 10:43:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r21346 r21406 394 394 return ERROR_EAS_DIDNT_FIT; 395 395 396 case ERROR_INIT_ROUTINE_FAILED: //295 397 return ERROR_DLL_INIT_FAILED_W; 398 396 399 // device driver specific error codes (I24) 397 400 case ERROR_USER_DEFINED_BASE + ERROR_I24_WRITE_PROTECT: … … 587 590 rc = DosMove((PSZ)lOemOldFile, (PSZ)lOemNewFile); 588 591 SetLastError(error2WinError(rc)); 589 } 592 } 590 593 return (rc == NO_ERROR); 591 594 } … … 981 984 openMode |= OPEN_ACCESS_READONLY; 982 985 else 983 //mgp: There seems to be a problem where OPEN_ACCESS_WRITEONLY gives an 984 // Access Error (0x05) if the file is opened with 985 // OPEN_ACTION_OPEN_IF_EXISTS. So, in that case, change it to 986 //mgp: There seems to be a problem where OPEN_ACCESS_WRITEONLY gives an 987 // Access Error (0x05) if the file is opened with 988 // OPEN_ACTION_OPEN_IF_EXISTS. So, in that case, change it to 986 989 // OPEN_ACCESS_READWRITE 987 990 if(fuAccess & GENERIC_WRITE_W) … … 1009 1012 openMode |= OPEN_FLAGS_DASD; 1010 1013 } 1011 1014 1012 1015 int retry = 0; 1013 1016 while (retry < 3) … … 1314 1317 APIRET rc; 1315 1318 DWORD newoffset; 1316 1319 1317 1320 switch(method) 1318 1321 { … … 1564 1567 DWORD ulMode; 1565 1568 APIRET rc; 1566 1569 1567 1570 rc = DosQueryFHState(hFile, &ulMode); 1568 1571 if(rc != NO_ERROR) return error2WinError(rc); … … 1574 1577 ulMode &= ~OPEN_FLAGS_NOINHERIT; 1575 1578 } 1576 else 1579 else 1577 1580 ulMode |= OPEN_FLAGS_NOINHERIT; 1578 1581 … … 2299 2302 { 2300 2303 DosFindClose(hDir); 2301 2304 2302 2305 //Windows returns ERROR_FILE_NOT_FOUND if the file/directory is not present 2303 2306 if(rc == ERROR_NO_MORE_FILES || rc == ERROR_PATH_NOT_FOUND) { 2304 SetLastError(ERROR_FILE_NOT_FOUND_W); 2305 } 2307 SetLastError(ERROR_FILE_NOT_FOUND_W); 2308 } 2306 2309 else SetLastError(error2WinError(rc)); 2307 2310 return INVALID_HANDLE_VALUE_W; … … 2435 2438 { 2436 2439 lpszColon = CharPrevA(lOemFileName, lpszBackslash); 2437 if(lpszColon && *lpszColon != ':') 2440 if(lpszColon && *lpszColon != ':') 2438 2441 {//only rootdir is allowed to have terminating backslash 2439 2442 *lpszBackslash = 0; … … 3114 3117 APIRET rc; 3115 3118 HMODULE hModule = NULLHANDLE; 3116 char name[ CCHMAXPATH ]; 3117 3119 char name[ CCHMAXPATH ] = { '\0' }; 3120 3121 //dprintf(("*** 1 %s", szModName)); 3118 3122 rc = DosLoadModule(name, CCHMAXPATH, szModName, &hModule); 3123 //dprintf(("*** 2 %d %x [%s]", rc, hModule, name)); 3124 //HMODULE hm1 = NULLHANDLE, hm2 = NULLHANDLE; 3125 //DosQueryModuleHandle(szModName, &hm1); 3126 //APIRET rc2 = DosQueryModuleHandle("JVM.DLL", &hm2); 3127 //name[0] = '!'; 3128 //name[1] = '\0'; 3129 //if (!rc2) { 3130 //name[0] = '\0'; 3131 //rc2 = DosQueryModuleName(hm2, CCHMAXPATH, name); 3132 //} 3133 //dprintf(("*** 3 %x %d %x [%s]", hm1, rc2, hm2, name)); 3119 3134 if(rc) { 3120 3135 SetLastError(error2WinError(rc,ERROR_FILE_NOT_FOUND)); … … 3360 3375 dprintf(("DosPhysicalDisk error: return code = %u\n", rc)); 3361 3376 return 0; 3362 } 3377 } 3363 3378 else { 3364 3379 dprintf(("DosPhysicalDisk: %u partitionable disk(s)\n",usNumDrives));
Note:
See TracChangeset
for help on using the changeset viewer.