Changeset 22025 for trunk/src/kernel32/hmfile.cpp
- Timestamp:
- Sep 28, 2012, 6:56:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmfile.cpp
r22024 r22025 1207 1207 } 1208 1208 1209 pHMHandleData->dwUserData = (DWORD) new HMFileInfo(0, (LPSTR)lpFileName, lpSecurityAttributes); 1210 pHMHandleData->hHMHandle = 0x8000000; 1209 pHMHandleData->dwUserData = (DWORD) new HMFileInfo(INVALID_HANDLE_VALUE, 1210 (LPSTR)lpFileName, lpSecurityAttributes); 1211 pHMHandleData->hHMHandle = 0x80000000; // make sure _HMHandleQuery won't fail 1211 1212 return (NO_ERROR); 1212 1213 … … 1329 1330 return finddata.nFileSizeLow; 1330 1331 } 1332 /***************************************************************************** 1333 * Name : BOOL HMDeviceFileInfoClass::GetFileInformationByHandle 1334 * Purpose : determine the handle type 1335 * Parameters: PHMHANDLEDATA pHMHandleData 1336 * BY_HANDLE_FILE_INFORMATION* pHFI 1337 * Variables : 1338 * Result : API returncode 1339 * Remark : 1340 * Status : 1341 *****************************************************************************/ 1342 1343 BOOL HMDeviceInfoFileClass::GetFileInformationByHandle(PHMHANDLEDATA pHMHandleData, 1344 BY_HANDLE_FILE_INFORMATION* pHFI) 1345 { 1346 dprintfl(("KERNEL32: HMDeviceInfoFileClass::GetFileInformationByHandle %s(%08xh,%08xh)\n", 1347 lpHMDeviceName, pHMHandleData, pHFI)); 1348 1349 HMFileInfo *fileInfo = (HMFileInfo *)pHMHandleData->dwUserData; 1350 dprintf(("*** %s", fileInfo->lpszFileName)); 1351 if(OSLibDosGetFileInformationByHandle(fileInfo->lpszFileName, 1352 INVALID_HANDLE_VALUE, 1353 pHFI)) 1354 { 1355 return TRUE; 1356 } 1357 dprintf(("GetFileInformationByHandle failed with error %d", GetLastError())); 1358 return FALSE; 1359 } 1331 1360 /****************************************************************************** 1332 1361 * Name : DWORD HMDeviceFileClass::GetFileNameFromHandle … … 1393 1422 //an LX header. We need to skip that to present the original file to the 1394 1423 //caller 1395 if( hFile&& !stricmp(lpszFileName + strlen(lpszFileName) - 4, ".EXE"))1424 if((hFile != INVALID_HANDLE_VALUE) && !stricmp(lpszFileName + strlen(lpszFileName) - 4, ".EXE")) 1396 1425 { 1397 1426 ULONG action, ulRead, signature, ulFileSize;
Note:
See TracChangeset
for help on using the changeset viewer.