Changeset 3995 for trunk/src/kernel32
- Timestamp:
- Aug 11, 2000, 8:42:55 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r3948 r3995 1 /* $Id: HandleManager.cpp,v 1.4 5 2000-08-04 21:12:05sandervl Exp $ */1 /* $Id: HandleManager.cpp,v 1.46 2000-08-11 18:42:53 sandervl Exp $ */ 2 2 3 3 /* … … 739 739 pHMHandleData->dwAccess = fdwAccess; 740 740 741 if( fdwOdinOptions &DUPLICATE_ACCESS_READWRITE) {741 if((fdwOdinOptions & DUPLICATE_ACCESS_READWRITE) == DUPLICATE_ACCESS_READWRITE) { 742 742 pHMHandleData->dwAccess = GENERIC_READ | GENERIC_WRITE; 743 743 } -
trunk/src/kernel32/hmfile.cpp
r3948 r3995 1 /* $Id: hmfile.cpp,v 1.1 4 2000-08-04 21:12:07sandervl Exp $ */1 /* $Id: hmfile.cpp,v 1.15 2000-08-11 18:42:54 sandervl Exp $ */ 2 2 3 3 /* … … 122 122 pHMHandleData->dwFlags, 123 123 hTemplate); 124 #ifdef SHARE_WORKAROUND 125 if (hFile == INVALID_HANDLE_ERROR) { 126 //could be a read-only drive -> FILE_SHARE_WRITE is illegal 127 pHMHandleData->dwShare = FILE_SHARE_READ; 128 hFile = OSLibDosCreateFile((LPSTR)lpFileName, 129 pHMHandleData->dwAccess, 130 pHMHandleData->dwShare, 131 (LPSECURITY_ATTRIBUTES)lpSecurityAttributes, 132 pHMHandleData->dwCreation, 133 pHMHandleData->dwFlags, 134 hTemplate); 135 } 136 #endif 137 124 138 if (hFile != INVALID_HANDLE_ERROR) 125 139 { -
trunk/src/kernel32/virtual.cpp
r3948 r3995 1 /* $Id: virtual.cpp,v 1.3 1 2000-08-04 21:12:09sandervl Exp $ */1 /* $Id: virtual.cpp,v 1.32 2000-08-11 18:42:55 sandervl Exp $ */ 2 2 3 3 /* … … 219 219 HANDLE hFile, hMapping = -1; 220 220 221 hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ , NULL,221 hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 222 222 OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); 223 223 if (hFile != INVALID_HANDLE_VALUE) … … 225 225 hMapping = CreateFileMappingA( hFile, NULL, PAGE_READONLY | ((fReadIntoMemory) ? SEC_COMMIT : 0), 0, 0, NULL ); 226 226 CloseHandle( hFile ); 227 if (hMapping != INVALID_HANDLE_VALUE)227 if (hMapping) 228 228 { 229 229 *lpMapping = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 ); … … 244 244 HANDLE hFile, hMapping = -1; 245 245 246 hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ , NULL,246 hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 247 247 OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); 248 248 if (hFile != INVALID_HANDLE_VALUE) … … 250 250 hMapping = CreateFileMappingA( hFile, NULL, PAGE_READONLY | ((fReadIntoMemory) ? SEC_COMMIT : 0), 0, 0, NULL ); 251 251 CloseHandle( hFile ); 252 if (hMapping != INVALID_HANDLE_VALUE)252 if (hMapping) 253 253 { 254 254 *lpMapping = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 ); -
trunk/src/kernel32/wprocess.cpp
r3993 r3995 1 /* $Id: wprocess.cpp,v 1.8 6 2000-08-11 10:56:20sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.87 2000-08-11 18:42:55 sandervl Exp $ */ 2 2 3 3 /* … … 431 431 BOOL rc; 432 432 433 //SvL: Ignore FreeLibary for executable 434 if(WinExe && hinstance == WinExe->getInstanceHandle()) { 435 return TRUE; 436 } 437 433 438 winmod = Win32DllBase::findModule(hinstance); 434 439 if(winmod) { … … 698 703 * Endif 699 704 */ 705 if(WinExe) { 706 char szDllName[CCHMAXPATH]; 707 char *dot; 708 709 strcpy(szDllName, OSLibStripPath((char *)lpszLibFile)); 710 strupr(szDllName); 711 dot = strstr(szDllName, "."); 712 if(dot) 713 *dot = 0; 714 715 if(!strcmp(szDllName, WinExe->getModuleName())) { 716 return WinExe->getInstanceHandle(); 717 } 718 } 700 719 pModule = Win32DllBase::findModule((LPSTR)lpszLibFile); 701 720 if (pModule) … … 1052 1071 if(WinExe) { 1053 1072 if(WinExe->getCommandLineW()) 1054 return WinExe->getCommandLineW();1073 return WinExe->getCommandLineW(); 1055 1074 } 1056 1075 if(asciicmdline == NULL) //not used for converted exes 1057 asciicmdline = O32_GetCommandLine();1076 asciicmdline = O32_GetCommandLine(); 1058 1077 1059 1078 if(asciicmdline) {
Note:
See TracChangeset
for help on using the changeset viewer.