Home |
Function RTFFindFirst |
Function RTFFindFirstThis function is obsolete. Use RTFFindFirstEx instead. RTFFindFirst searches a directory for a file satisfying certain criteria: RTFHANDLE RTFFindFirst(const char * NamePattern, BYTE Attr1, BYTE Attr2, RTFDOSDirEntry * FileInfo, char * FileName); ParametersNamePatternMust point to a file name, which can contain wildcard characters '*' and/or '?', and can optionally be preceded by a path. If a path is present, it must not contain any wildcard characters. Attr1Specifies a set of all file attributes a file must have to match the request. Attr2Exclude attributes. Files having any one of these attributes set do not satisfy the request. Note that specifying the same attributes for both Attr1 and Attr2 will find no files. Any combination of the following flags can be specified for Attr1 and Attr2:
FileInfoPointer to an RTFDOSDirEntry structure. If the function succeeds, this structure will be filled with the directory entry of the file found. FileNamePoints to a string buffer which must be at least 13 characters long. This buffer will receive the file name if a file is found. This parameter may be NULL. return valueIf the function succeeds, at least one file satisfies the search criteria. *FileInfo contains the directory entry of the first file and the function return value is greater than or equal to 0. The return value is a file handle which may be passed to subsequent calls to RTFFindNext. If the function fails, the return value is a negative error code. In this case, no handle is allocated and RTFFindClose need not be called. Please note that on exFAT and ISO 9660 volumes, no file name is stored in *FileInfo. It is important to close the handle using RTFFindClose when no longer needed. Failing to do so will quickly exhaust the available file handles.
|