Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function searches a directory for a file whose name matches the specified filename. CeFindFirstFileexamines subdirectory names as well as filenames.
CeFindFirstFileis a remote application interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.
HANDLE CeFindFirstFile( LPCWSTR lpFileName , LPCE_FIND_DATA lpFindFileData );
Parameters
There is a default string size limit for paths of MAX_PATH characters. This limit is related to how the FindFirstFilefunction 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" and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as "\\bill_g_1\hotstuff\coolapps."
Return Values
A search handle, used in a subsequent call to CeFindNextFileor 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 versions 1.0 and 1.01, use the PegFindFirstFilefunction.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Rapi.h |
See Also
CeGetLastError, FindFirstFile, CeRapiGetError, CE_FIND_DATA, WIN32_FIND_DATA