Ignore:
Timestamp:
Dec 6, 2001, 4:57:52 PM (24 years ago)
Author:
sandervl
Message:

overlapped io updates

File:
1 edited

Legend:

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

    r7555 r7560  
    1 /* $Id: Fileio.cpp,v 1.60 2001-12-06 10:14:45 sandervl Exp $ */
     1/* $Id: Fileio.cpp,v 1.61 2001-12-06 15:57:51 sandervl Exp $ */
    22
    33/*
     
    266266  int    namelen;
    267267
    268     if(lpFileName == NULL || lpFindFileData == NULL)
     268    if(lpFileName == NULL || lpFindFileData == NULL || lpSearchFilter != NULL)
    269269    {
     270        dprintf(("!ERROR!: invalid parameter(s)"));
    270271        SetLastError(ERROR_INVALID_PARAMETER);
    271272        return INVALID_HANDLE_VALUE;
    272273    }
    273274
    274     if ((fSearchOp != FindExSearchNameMatch) || (dwAdditionalFlags != 0))
    275     {
     275    if(fSearchOp == FindExSearchLimitToDevices) {
     276        dprintf(("!ERROR!: FindExSearchLimitToDevices not implemented"));
     277        SetLastError(ERROR_NOT_SUPPORTED);
     278        return INVALID_HANDLE_VALUE;
     279    }
     280    else
     281    if(fSearchOp == FindExSearchLimitToDirectories) {     
     282        //NOTE: According to the SDK docs we are allowed to silently ignore this option
     283        dprintf(("!WARNING!: FindExSearchLimitToDirectories IGNORED"));
     284        fSearchOp = FindExSearchNameMatch;
     285    }
     286    if(dwAdditionalFlags != 0) {
    276287        dprintf(("!ERROR!: options not implemented 0x%08x 0x%08lx\n", fSearchOp, dwAdditionalFlags ));
    277         SetLastError(ERROR_INVALID_PARAMETER);
     288        SetLastError(ERROR_NOT_SUPPORTED);
    278289        return INVALID_HANDLE_VALUE;
    279290    }
     
    296307        return (HANDLE)OSLibDosFindFirst(filename, (WIN32_FIND_DATAA *)lpFindFileData);
    297308
    298     default: //TODO
     309    default: //should never happen
    299310        dprintf(("!ERROR! unsupported fInfoLevelId"));
    300311        SetLastError(ERROR_INVALID_PARAMETER);
     
    16311642  return HMCancelIo(hFile);
    16321643}
    1633 //******************************************************************************
    1634 //******************************************************************************
     1644/*****************************************************************************
     1645 * Name      : BOOL GetOverlappedResult
     1646 * Purpose   : forward call to Open32
     1647 * Parameters:
     1648 * Variables :
     1649 * Result    :
     1650 * Remark    : handle translation is done in GetOverlappedResult
     1651 * Status    :
     1652 *
     1653 * Author    : Patrick Haller [Fri, 1999/06/18 03:44]
     1654 *****************************************************************************/
     1655
     1656ODINFUNCTION4(BOOL, GetOverlappedResult,
     1657              HANDLE, hFile,              /* [in] handle of file to check on */
     1658              LPOVERLAPPED, lpOverlapped, /* [in/out] pointer to overlapped  */
     1659              LPDWORD, lpTransferred,     /* [in/out] number of bytes transferred  */
     1660              BOOL, bWait)                /* [in] wait for the transfer to complete ? */
     1661{
     1662  if(lpOverlapped == NULL || lpOverlapped->hEvent == 0) {
     1663      dprintf(("!ERROR!: lpOverlapped == NULL || lpOverlapped->hEvent == 0"));
     1664      SetLastError(ERROR_INVALID_PARAMETER);
     1665      return FALSE;
     1666  }
     1667
     1668  return HMGetOverlappedResult(hFile,
     1669                               lpOverlapped,
     1670                               lpTransferred,
     1671                               bWait);
     1672}
     1673//******************************************************************************
     1674//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.