Share via


CeFindFirstFile

This function searches a directory for a file whose name matches the specified file name. CeFindFirstFile examines subdirectory names in addition to file names.

CeFindFirstFile is a RAPI that enables an application that is running on a desktop computer to make function calls on a Microsoft® Windows® CE–based device.

STDAPI_(HANDLE) CeFindFirstFile(
  LPCWSTR lpFileName, 
  LPCE_FIND_DATA lpFindFileData 
);

Parameters

  • lpFileName
    [in] Long pointer to a null-terminated string that specifies a valid directory or path and file name, which can contain wildcard characters (* and ?).

    There is a default string size limit for paths of MAX_PATH characters. This limit is related to how the FindFirstFile function parses paths.

  • lpFindFileData
    [out] Long pointer to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory.

Return Values

A search handle, used in a subsequent call to CeFindNextFile or CeFindClose, indicates success. INVALID_HANDLE_VALUE indicates failure. To determine whether a function failed because of RAPI errors, call CeRapiGetError. To determine whether a function failed because of non-RAPI errors, call CeGetLastError.

Requirements

Smartphone Platforms: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: rapi.h
Library: rapi.lib

See Also

CE_FIND_DATA

Last updated on Friday, April 22, 2005

© 2005 Microsoft Corporation. All rights reserved.

Send feedback on this topic to the authors.