Ignore:
Timestamp:
Sep 27, 2012, 4:08:58 PM (13 years ago)
Author:
dmik
Message:

kernel32: Fix inverted return values in dummy HMDeviceHandler implementations.

This in particular affected GetFileInformationByHandle and other APIs. Some applications
(like Flash 10.1+) could be completely confused by the fact that the unimplemented API
returns success.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/HandleManager.cpp

    r21916 r22024  
    23722372{
    23732373  int       iIndex;                           /* index into the handle table */
    2374   BOOL      dwResult;                /* result from the device handler's API */
     2374  BOOL      bResult;                 /* result from the device handler's API */
    23752375  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
    23762376
     
    23882388      return ERROR_SYS_INTERNAL;
    23892389
    2390   dwResult = pHMHandle->pDeviceHandler->UnlockFileEx(&pHMHandle->hmHandleData,
    2391                                                      dwReserved,
    2392                                                      nNumberOfBytesToLockLow,
    2393                                                      nNumberOfBytesToLockHigh,
    2394                                                      lpOverlapped);
    2395 
    2396   return (dwResult);                                  /* deliver return code */
     2390  bResult = pHMHandle->pDeviceHandler->UnlockFileEx(&pHMHandle->hmHandleData,
     2391                                                    dwReserved,
     2392                                                    nNumberOfBytesToLockLow,
     2393                                                    nNumberOfBytesToLockHigh,
     2394                                                    lpOverlapped);
     2395
     2396  return (bResult);                                   /* deliver return code */
    23972397}
    23982398
Note: See TracChangeset for help on using the changeset viewer.