Changeset 21339 for trunk/src/kernel32/HandleManager.cpp
- Timestamp:
- Aug 14, 2009, 5:18:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/HandleManager.cpp
r21332 r21339 85 85 // this is the size of our currently static handle table 86 86 #define MAX_OS2_HMHANDLES (4*1024) 87 87 #define ERROR_SYS_INTERNAL 328 88 88 89 89 /***************************************************************************** … … 589 589 if (HMGlobals.fIsInitialized != TRUE) 590 590 { 591 592 #ifdef RAS 593 RasRegisterObjectTracking(&rthHandles, "KERNEL32 handles", 594 0, RAS_TRACK_FLAG_LOGOBJECTCONTENT, 591 592 #ifdef RAS 593 RasRegisterObjectTracking(&rthHandles, "KERNEL32 handles", 594 0, RAS_TRACK_FLAG_LOGOBJECTCONTENT, 595 595 LogObjectContent_Handle, NULL); 596 596 #endif … … 1504 1504 1505 1505 /* 1506 * Based on testcase (5) and MSDN: 1506 * Based on testcase (5) and MSDN: 1507 1507 * "OF_PARSE Fills the OFSTRUCT structure but carries out no other action." 1508 1508 */ … … 1778 1778 1779 1779 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 1780 1781 if (!pHMHandle || !pHMHandle->pDeviceHandler) 1782 return ERROR_SYS_INTERNAL; 1783 1780 1784 fResult = pHMHandle->pDeviceHandler->ReadFile(&pHMHandle->hmHandleData, 1781 1785 lpBuffer, … … 1829 1833 1830 1834 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 1835 1836 if (!pHMHandle || !pHMHandle->pDeviceHandler) 1837 return ERROR_SYS_INTERNAL; 1838 1831 1839 fResult = pHMHandle->pDeviceHandler->WriteFile(&pHMHandle->hmHandleData, 1832 1840 lpBuffer, … … 1866 1874 1867 1875 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 1876 1877 if (!pHMHandle || !pHMHandle->pDeviceHandler) 1878 return ERROR_SYS_INTERNAL; 1879 1868 1880 dwResult = pHMHandle->pDeviceHandler->GetFileType(&pHMHandle->hmHandleData); 1869 1881 … … 1906 1918 1907 1919 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 1920 1921 if (!pHMHandle || !pHMHandle->pDeviceHandler) 1922 return ERROR_SYS_INTERNAL; 1923 1908 1924 dwResult = pHMHandle->pDeviceHandler->_DeviceRequest(&pHMHandle->hmHandleData, 1909 1925 ulRequestCode, … … 1912 1928 arg3, 1913 1929 arg4); 1914 1915 1930 return (dwResult); /* deliver return code */ 1916 1931 } … … 1945 1960 1946 1961 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 1962 1963 if (!pHMHandle || !pHMHandle->pDeviceHandler) 1964 return ERROR_SYS_INTERNAL; 1965 1947 1966 dwResult = pHMHandle->pDeviceHandler->GetFileInformationByHandle(&pHMHandle->hmHandleData, 1948 1967 pHFI); … … 1979 1998 1980 1999 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2000 2001 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2002 return ERROR_SYS_INTERNAL; 2003 1981 2004 bResult = pHMHandle->pDeviceHandler->SetEndOfFile(&pHMHandle->hmHandleData); 1982 2005 … … 2015 2038 2016 2039 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2040 2041 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2042 return ERROR_SYS_INTERNAL; 2043 2017 2044 bResult = pHMHandle->pDeviceHandler->SetFileTime(&pHMHandle->hmHandleData, 2018 2045 (LPFILETIME)pFT1, … … 2051 2078 2052 2079 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2080 2081 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2082 return ERROR_SYS_INTERNAL; 2083 2053 2084 bResult = pHMHandle->pDeviceHandler->GetFileTime(&pHMHandle->hmHandleData, 2054 2085 (LPFILETIME)pFT1, … … 2087 2118 2088 2119 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2120 2121 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2122 return ERROR_SYS_INTERNAL; 2123 2089 2124 dwResult = pHMHandle->pDeviceHandler->GetFileSize(&pHMHandle->hmHandleData, 2090 2125 pSize); … … 2133 2168 2134 2169 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2170 2171 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2172 return ERROR_SYS_INTERNAL; 2173 2135 2174 dwResult = pHMHandle->pDeviceHandler->SetFilePointer(&pHMHandle->hmHandleData, 2136 2175 lDistanceToMove, … … 2195 2234 2196 2235 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2236 2237 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2238 return ERROR_SYS_INTERNAL; 2239 2197 2240 dwResult = pHMHandle->pDeviceHandler->LockFile(&pHMHandle->hmHandleData, 2198 2241 arg2, … … 2242 2285 2243 2286 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2287 2288 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2289 return ERROR_SYS_INTERNAL; 2290 2244 2291 dwResult = pHMHandle->pDeviceHandler->LockFileEx(&pHMHandle->hmHandleData, 2245 2292 dwFlags, … … 2285 2332 2286 2333 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2334 2335 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2336 return ERROR_SYS_INTERNAL; 2337 2287 2338 dwResult = pHMHandle->pDeviceHandler->UnlockFile(&pHMHandle->hmHandleData, 2288 2339 arg2, … … 2330 2381 2331 2382 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2383 2384 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2385 return ERROR_SYS_INTERNAL; 2386 2332 2387 dwResult = pHMHandle->pDeviceHandler->UnlockFileEx(&pHMHandle->hmHandleData, 2333 2388 dwReserved, … … 2430 2485 } 2431 2486 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2487 2488 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2489 return ERROR_SYS_INTERNAL; 2490 2432 2491 dwResult = pHMHandle->pDeviceHandler->WaitForSingleObject(&pHMHandle->hmHandleData, 2433 2492 dwTimeout); … … 2466 2525 2467 2526 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2527 2528 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2529 return ERROR_SYS_INTERNAL; 2530 2468 2531 dwResult = pHMHandle->pDeviceHandler->WaitForSingleObjectEx(&pHMHandle->hmHandleData, 2469 2532 dwTimeout, … … 2501 2564 2502 2565 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2566 2567 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2568 return ERROR_SYS_INTERNAL; 2569 2503 2570 dwResult = pHMHandle->pDeviceHandler->FlushFileBuffers(&pHMHandle->hmHandleData); 2504 2571 … … 2537 2604 2538 2605 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2606 2607 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2608 return ERROR_SYS_INTERNAL; 2609 2539 2610 dwResult = pHMHandle->pDeviceHandler->GetOverlappedResult(&pHMHandle->hmHandleData, 2540 2611 lpOverlapped, … … 2573 2644 2574 2645 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2646 2647 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2648 return ERROR_SYS_INTERNAL; 2649 2575 2650 dwResult = pHMHandle->pDeviceHandler->ReleaseMutex(&pHMHandle->hmHandleData); 2576 2651 … … 2920 2995 2921 2996 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 2997 2998 if (!pHMHandle || !pHMHandle->pDeviceHandler) 2999 return ERROR_SYS_INTERNAL; 3000 2922 3001 dwResult = pHMHandle->pDeviceHandler->ReleaseSemaphore(&pHMHandle->hmHandleData, 2923 3002 cReleaseCount, … … 3108 3187 3109 3188 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 3189 3190 if (!pHMHandle || !pHMHandle->pDeviceHandler) 3191 return NULL; 3192 3110 3193 lpResult = pHMHandle->pDeviceHandler->MapViewOfFileEx(&pHMHandle->hmHandleData, 3111 3194 dwDesiredAccess, … … 3320 3403 3321 3404 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 3405 3406 if (!pHMHandle || !pHMHandle->pDeviceHandler) 3407 return ERROR_SYS_INTERNAL; 3408 3322 3409 fResult = pHMHandle->pDeviceHandler->DeviceIoControl(&pHMHandle->hmHandleData, 3323 3410 dwIoControlCode, … … 3371 3458 3372 3459 pHMHandle = &TabWin32Handles[iIndex]; /* call device handler */ 3460 3461 if (!pHMHandle || !pHMHandle->pDeviceHandler) 3462 return ERROR_SYS_INTERNAL; 3463 3373 3464 fResult = pHMHandle->pDeviceHandler->CancelIo(&pHMHandle->hmHandleData); 3374 3465
Note:
See TracChangeset
for help on using the changeset viewer.