Changeset 3259 for trunk/src/kernel32/hmopen32.cpp
- Timestamp:
- Mar 28, 2000, 7:11:50 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmopen32.cpp
r3228 r3259 1 /* $Id: hmopen32.cpp,v 1. 19 2000-03-24 19:25:32sandervl Exp $ */1 /* $Id: hmopen32.cpp,v 1.20 2000-03-28 17:11:49 sandervl Exp $ */ 2 2 3 3 /* … … 700 700 PHMHANDLEDATA pHMHandleData, 701 701 OFSTRUCT *pOFStruct, 702 UINT arg3)702 UINT fuMode) 703 703 { 704 704 HFILE hFile; 705 705 FILETIME filetime; 706 706 WORD filedatetime[2]; 707 char filepath[260]; 707 708 708 709 dprintfl(("KERNEL32: HandleManager::Open32::OpenFile %s(%s,%08x,%08x,%08x) - stub?\n", … … 711 712 pHMHandleData, 712 713 pOFStruct, 713 arg3));714 715 if 714 fuMode)); 715 716 if(strcmp(lpFileName, // "support" for local unc names 716 717 "\\\\.\\") == 0) 718 { 717 719 lpFileName+=4; 718 720 } 721 else 722 if(!strchr(lpFileName, ':') && !strchr(lpFileName, '\\')) 723 { 724 //filename only; search for file in following order 725 //1: dir from which the app loaded 726 //2: current dir 727 //3: windows system dir 728 //4: windows dir 729 //5: dirs in path path environment variable 730 //SearchPath does exactly that 731 LPSTR filenameinpath; 732 733 if(SearchPathA(NULL, lpFileName, NULL, sizeof(filepath), filepath, &filenameinpath) == 0 734 && !(fuMode & OF_CREATE) ) { 735 SetLastError(ERROR_FILE_NOT_FOUND); 736 return HFILE_ERROR; 737 } 738 lpFileName = filepath; 739 } 719 740 // filling OFSTRUCT 720 741 memset(pOFStruct, 0, sizeof(OFSTRUCT)); … … 725 746 hFile = O32_OpenFile(lpFileName, 726 747 pOFStruct, 727 arg3);748 fuMode); 728 749 if (hFile != INVALID_HANDLE_ERROR) 729 750 {
Note:
See TracChangeset
for help on using the changeset viewer.