Changeset 7593 for trunk/src/kernel32/HandleManager.cpp
- Timestamp:
- Dec 9, 2001, 5:00:30 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r7579 r7593 1 /* $Id: HandleManager.cpp,v 1.8 5 2001-12-08 15:12:15 sandervlExp $ */1 /* $Id: HandleManager.cpp,v 1.86 2001-12-09 16:00:30 bird Exp $ */ 2 2 3 3 /* … … 85 85 *****************************************************************************/ 86 86 87 typedef struct _HMDEVICE;88 89 87 typedef struct _HMHANDLE 90 88 { … … 265 263 //SvL: Mark handle as allocated here. Doing it outside of this function 266 264 // isn't thread safe. (and not very smart) 267 TabWin32Handles[ulLoop].hmHandleData.hHMHandle = ulLoop; 265 TabWin32Handles[ulLoop].hmHandleData.hHMHandle = ulLoop; 268 266 TabWin32Handles[ulLoop].hmHandleData.dwUserData = 0; 269 267 TabWin32Handles[ulLoop].hmHandleData.dwInternalType = HMTYPE_UNKNOWN; … … 435 433 436 434 HMGlobals.fIsInitialized = TRUE; /* OK, done */ 437 435 438 436 #if 1 439 //This is a very bad idea. \\\\.\\NTICE -> NTICE, if the file exits, then 437 //This is a very bad idea. \\\\.\\NTICE -> NTICE, if the file exits, then 440 438 //it will open the file instead of the device driver 441 439 /* add standard symbolic links first, so local symbolic links in the … … 472 470 } 473 471 #endif 474 472 475 473 /* copy standard handles from OS/2's Open32 Subsystem */ 476 474 HMGlobals.pHMStandard = new HMDeviceStandardClass("\\\\STANDARD_HANDLE\\"); … … 585 583 hHandleOS2)); 586 584 #endif 587 585 588 586 // @@@PH 2001-09-27 589 587 // prevent too quick re-use of last handle … … 1036 1034 lpFileName = szFilename; 1037 1035 } 1038 1039 1036 1037 1040 1038 pDeviceHandler = _HMDeviceFind((LPSTR)lpFileName); /* find device */ 1041 1039 if (NULL == pDeviceHandler) /* this name is unknown to us */ … … 1103 1101 if (rc != NO_ERROR) /* oops, creation failed within the device handler */ 1104 1102 { 1105 TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE; 1106 1103 TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE; 1104 1107 1105 // Note: 1108 1106 // device handlers have to return an Win32-style error code … … 1174 1172 PHMHANDLEDATA pHMHandleData; 1175 1173 DWORD rc; /* API return code */ 1176 1174 1177 1175 // name resolving 1178 1176 CHAR szFilename[260]; … … 1185 1183 lpFileName = szFilename; 1186 1184 } 1187 1188 1185 1186 1189 1187 if(fuMode & OF_REOPEN) { 1190 1188 pDeviceHandler = _HMDeviceFind((LPSTR)pOFStruct->szPathName); /* find device */ … … 1203 1201 } 1204 1202 else pDevData = _HMDeviceGetData((LPSTR)lpFileName); 1205 1203 1206 1204 1207 1205 if(pDeviceHandler == HMGlobals.pHMOpen32) { … … 1918 1916 // processes messages while waiting for the process to die) 1919 1917 //(Napster install now doesn't block PM anymore (forcing a reboot)) 1920 1918 1921 1919 HMODULE hUser32 = LoadLibraryA("USER32.DLL"); 1922 1920 … … 1941 1939 1942 1940 while(TRUE) { 1943 dwResult = HMMsgWaitForMultipleObjects(1, &hObject, FALSE, 1941 dwResult = HMMsgWaitForMultipleObjects(1, &hObject, FALSE, 1944 1942 INFINITE, QS_ALLINPUT); 1945 1943 if(dwResult == WAIT_OBJECT_0 + 1) { 1946 1944 MSG msg ; 1947 1948 while (pfnPeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 1945 1946 while (pfnPeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 1949 1947 { 1950 1948 if (msg.message == WM_QUIT) { … … 1954 1952 return WAIT_ABANDONED; 1955 1953 } 1956 1954 1957 1955 /* otherwise dispatch it */ 1958 1956 pfnDispatchMessageA(&msg); 1959 1957 1960 1958 } // end of PeekMessage while loop 1961 1959 } … … 2273 2271 pHMHandleData->dwShare = 0; 2274 2272 pHMHandleData->dwCreation = 0; 2275 pHMHandleData->dwFlags = 0; 2273 pHMHandleData->dwFlags = 0; 2276 2274 pHMHandleData->lpHandlerData = NULL; 2277 2275 … … 2543 2541 } 2544 2542 } 2545 2543 2546 2544 pDeviceHandler = HMGlobals.pHMSemaphore; /* device is predefined */ 2547 2545 … … 3026 3024 *****************************************************************************/ 3027 3025 3028 DWORD HMMsgWaitForMultipleObjects (DWORD cObjects, 3026 DWORD HMMsgWaitForMultipleObjects (DWORD cObjects, 3029 3027 LPHANDLE lphObjects, 3030 3028 BOOL fWaitAll, … … 4687 4685 * Result : 4688 4686 * Remark : 4689 * Status : 4687 * Status : 4690 4688 * 4691 4689 * Author : SvL … … 4748 4746 * Result : 4749 4747 * Remark : 4750 * Status : 4748 * Status : 4751 4749 * 4752 4750 * Author : SvL … … 4786 4784 * Result : 4787 4785 * Remark : 4788 * Status : 4786 * Status : 4789 4787 * 4790 4788 * Author : SvL
Note:
See TracChangeset
for help on using the changeset viewer.