Compartir a través de


CeFindFirstFile (RAPI) (Windows CE 5.0)

Send Feedback

This function searches a directory for a file whose name matches the specified filename. CeFindFirstFile examines subdirectory names as well as filenames.

CeFindFirstFile is a remote application programming interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.

HANDLECeFindFirstFile(LPCWSTRlpFileName, LPCE_FIND_DATAlpFindFileData);

Parameters

  • lpFileName
    [in] Long pointer to a null-terminated string that specifies a valid directory or path and filename, 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. An application can transcend this limit and send in paths longer than MAX_PATH characters prepending \\?\ to the path. The \\?\ tells the function to turn off path parsing; it lets paths longer than MAX_PATH be used with FindFirstFile. However, each component in the path cannot be more than MAX_PATH characters long. This also works with Universal Naming Convention (UNC) names. The \\?\ is ignored as part of the path. For example, \\?\C:\myworld\private is seen as C:\myworld\private.

  • lpFindFileData
    [out] Long pointer to the CE_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 if a function failed because of RAPI errors, call CeRapiGetError. To determine if a function failed because of non-RAPI errors, call CeGetLastError.

Remarks

When writing applications for Windows CE 1.0 and 1.01, use the PegFindFirstFile function.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Rapi.h.
Link Library: Rapi.lib.

See Also

RAPI Functions | CeGetLastError | FindFirstFile | CeRapiGetError | CE_FIND_DATA | WIN32_FIND_DATA

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.