IFSMgr_TransMatch


IFSMgr_TransMatch(
 pioreq pir,
 srch_entry * pse,
 string_t pattern,
 _WIN32_FIND_DATA * pFindBuf
 )

This service converts a search buffer that is in the old DOS format (using the DTA) to a Win32 find buffer format with all the filenames in unicode. Optionally, if a valid pattern is passed in, it will perform long name matching semantics on the name that has been found. This service can be used to support long name matching semantics on volumes that allow only DOS semantics. The search can be done in the normal DOS style and then be filtered further and converted to the Win32 find buffer format by calling this service. This service calls IFSMgr_MetaMatch internally for its meta-matching, so it provides the same uniform matching semantics.

pir

Supplies pointer to the IOREQ structure.

pse

Supplies pointer to DOS search buffer structure srch_entry. The relevant fields are described below:

Srch_Entry Structure:

Value

Meaning

se_key

Search key structure srch_key which contains information pertinent to the search operation that is in progress. This provides no input parameters.

se_attrib

Returns attributes of matched file.


Return Attribute Values:

Any combination of the following attributes may be returned.

Value

Meaning

FILE_ATTRIBUTE_READONLY

Read-Only file.

FILE_ATTRIBUTE_HIDDEN

Hidden file.

FILE_ATTRIBUTE_SYSTEM

System file.

FILE_ATTRIBUTE_DIRECTORY

Subdirectory.

FILE_ATTRIBUTE_ARCHIVE

Archive file.

This attribute cannot be returned in combination with other attributes.

FILE_ATTRIBUTE_VOLUMELABEL

Volume label.


se_timeM

Returns DOS file time of matched file. This field is set by the FSD.

se_date

Returns DOS file date of matched file. This field is set by the FSD.

se_size

Returns size of matched file. This field is set by the FSD.

se_name[13]

Returns filename of matched file. This field is set by the FSD to the matching filename found by the search. The filename must be stored as an 8.3 format ASCIIZ string.

pattern

Supplies pattern to be matched in unicode long name format. Note that the 8.3 format is also acceptable since it is just a subset of the long name format.

pFindBuf

Supplies the pointer to the _WIN32_FIND_DATA buffer to contain the results of the find. Note that the filename strings in this buffer are unicode, so the buffer allocation needs to take care of this.

IOREQ Structure:

ir_pos

Returns the continuation key for the find. This is extracted from the sk_localFSD field in the srch_key structure se_key.

ir_data

Returns the Win32 find structure _WIN32_FIND_DATA filled in as follows:


Find Data Structure:

dwFileAttributes

Returns the file attributes of the file found.


Attribute Values:

Value

Meaning

Any valid combination of the following attributes may be returned.

FILE_ATTRIBUTE_READONLY

Read-Only file.

FILE_ATTRIBUTE_HIDDEN

Hidden file.

FILE_ATTRIBUTE_SYSTEM

System file.

FILE_ATTRIBUTE_DIRECTORY

Subdirectory.

FILE_ATTRIBUTE_ARCHIVE

Archive file.

FILE_ATTRIBUTE_VOLUMELABEL

Volume label found.


ftCreationTime

Returns the file creation time in the Win32 FileTime structure format.


Win32 FileTime Structure:

Value

Meaning

dwLowDateTime

Returns the low double word of the time in Win32 format.

dwHighDateTime

Returns the high double word of the time in Win32 format.


ftLastAccessTime

Returns the file last access time in Win32 FileTime structure format defined above.

ftLastWriteTime

Returns the file last write time in Win32 FileTime structure format defined above.

nFileSizeHigh

Returns the high 32-bits of the file size.

nFileSizeLow

Returns the low 32-bits of the file size.

cFileName

Returns the unicode long filename that was found.

CAlternateFileName

Returns the unicode alternate alias name (short file name) of the file that was found.