- Timestamp:
- Sep 10, 2000, 11:54:07 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/Fileio.cpp
r4171 r4230 1 /* $Id: Fileio.cpp,v 1.3 7 2000-09-03 09:32:04sandervl Exp $ */1 /* $Id: Fileio.cpp,v 1.38 2000-09-10 21:54:05 sandervl Exp $ */ 2 2 3 3 /* … … 601 601 rc = O32_GetFileAttributes((LPSTR)lpszFileName); 602 602 if(rc == -1 && lpszFileName[strlen(lpszFileName)-1] != '\\') { 603 char *filename = (char *)alloca(strlen(lpszFileName)+ 1);603 char *filename = (char *)alloca(strlen(lpszFileName)+2); //+2!!!!!! 604 604 strcpy(filename, lpszFileName); 605 605 strcat(filename, "\\"); -
trunk/src/kernel32/hmfile.cpp
r4171 r4230 1 /* $Id: hmfile.cpp,v 1. 19 2000-09-03 09:32:19sandervl Exp $ */1 /* $Id: hmfile.cpp,v 1.20 2000-09-10 21:54:06 sandervl Exp $ */ 2 2 3 3 /* … … 314 314 if(fdwOdinOptions) 315 315 { 316 if(CreateFile(srcfileinfo->lpszFileName, pHMHandleData, 316 HMHANDLEDATA duphdata; 317 318 memcpy(&duphdata, pHMHandleData, sizeof(duphdata)); 319 duphdata.dwCreation = OPEN_EXISTING; 320 321 if(CreateFile(srcfileinfo->lpszFileName, &duphdata, 317 322 srcfileinfo->lpSecurityAttributes, NULL) == NO_ERROR) 318 323 { 324 memcpy(pHMHandleData, &duphdata, sizeof(duphdata)); 325 SetLastError(ERROR_SUCCESS); 319 326 return TRUE; 320 327 } 321 dprintf(("ERROR: DuplicateHandle; CreateFile %s failed !",328 dprintf(("ERROR: DuplicateHandle; CreateFile %s failed -> trying DosDupHandle instead!", 322 329 srcfileinfo->lpszFileName)); 323 return FALSE; 330 //SvL: IE5 setup opens file with DENYREADWRITE, so CreateFile can't 331 // be used for duplicating the handle; try DosDupHandle instead 324 332 } 325 333 … … 339 347 } 340 348 else { 349 SetLastError(ERROR_SUCCESS); 341 350 pHMHandleData->hHMHandle = *desthandle; 342 351 return TRUE; // OK -
trunk/src/kernel32/hmmmap.cpp
r3948 r4230 1 /* $Id: hmmmap.cpp,v 1.1 4 2000-08-04 21:12:07sandervl Exp $ */1 /* $Id: hmmmap.cpp,v 1.15 2000-09-10 21:54:06 sandervl Exp $ */ 2 2 3 3 /* … … 215 215 } 216 216 //Although an application may close the file handle used to create a file 217 //mapping object, the system holds the corresponding file open until the last217 //mapping object, the system keeps the corresponding file open until the last 218 218 //view of the file is unmapped. 219 219 map = (Win32MemMap *)pHMHandleData->dwUserData; -
trunk/src/kernel32/initsystem.cpp
r4134 r4230 1 /* $Id: initsystem.cpp,v 1.1 4 2000-08-31 12:47:51sandervl Exp $ */1 /* $Id: initsystem.cpp,v 1.15 2000-09-10 21:54:06 sandervl Exp $ */ 2 2 /* 3 3 * Odin system initialization (registry, directories & environment) … … 99 99 DWORD val; 100 100 char digbuf[16]; 101 char shellpath[260]; 101 102 102 103 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Control\\Windows",&hkey)!=ERROR_SUCCESS) { … … 116 117 RegSetValueExA(hkey,"ShutdownTime",0,REG_DWORD, (LPBYTE)ShutdownTime, sizeof(ShutdownTime)); 117 118 RegCloseKey(hkey); 119 120 //CurrentVersion\RunOnce 121 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce",&hkey)!=ERROR_SUCCESS) { 122 dprintf(("InitRegistry: Unable to register system information (2)")); 123 return FALSE; 124 } 125 RegCloseKey(hkey); 126 127 //System\CurrentControlSet\Control\Session Manager 128 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\Control\\Session Manager",&hkey)!=ERROR_SUCCESS) { 129 dprintf(("InitRegistry: Unable to register system information (2)")); 130 return FALSE; 131 } 132 RegCloseKey(hkey); 133 134 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\iexplore.exe",&hkey)!=ERROR_SUCCESS) { 135 dprintf(("InitRegistry: Unable to register system information (2)")); 136 return FALSE; 137 } 138 strcpy(shellpath, InternalGetWindowsDirectoryA()); 139 strcat(shellpath, "\\IEXPLORE.EXE"); 140 RegSetValueExA(hkey, "", 0, REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 141 RegCloseKey(hkey); 142 118 143 119 144 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",&hkey)!=ERROR_SUCCESS) { … … 151 176 //"NetHood"="C:\WINDOWS\NetHood" 152 177 //"Personal"="C:\My Documents" 153 154 char shellpath[260];155 178 156 179 if(RegCreateKeyA(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",&hkey)!=ERROR_SUCCESS) { -
trunk/src/kernel32/mmap.cpp
r3948 r4230 1 /* $Id: mmap.cpp,v 1.4 3 2000-08-04 21:12:08sandervl Exp $ */1 /* $Id: mmap.cpp,v 1.44 2000-09-10 21:54:07 sandervl Exp $ */ 2 2 3 3 /* … … 122 122 goto fail; 123 123 } 124 mSize = SetFilePointer(hMemFile, 0, NULL, FILE_BEGIN); 124 125 mSize = SetFilePointer(hMemFile, 0, NULL, FILE_END); 125 126 if(mSize == -1) {
Note:
See TracChangeset
for help on using the changeset viewer.