MatchBasisName

MatchBasisName(
 string_t pBasisName,
 string_t pName
 )
 

This service compares two FCB-format unicode strings. One string is the "basis" name created from a long-name using the CreateBasis service. The other is a the FCB-format name retrieved from the OEM directory entry and converted to unicode by calling the BCSToUni service. The basis and the name are then "matched". This matching is different from normal matching. The name retrieved from the media could have a numeric tail on the primary name if it was an auto-generated name. This service compares the part of the primary name without the numeric tail and the extension of the directory name to the corresponding parts of the basis name. If there is a match, then the basis name is considered to match the directory name. This helps during auto-generation of a unique name with a numeric tail. Instead of sequentially generating a name with increasing values for the numeric tail and searching the entire directory for each generated name to check if it is unique, the entire directory can be walked once looking for a match with the basis name. Any number that does not already exist as a numeric tail for the matched primary name can now be used as a numeric tail for the basis name without checking further for uniqueness. While this scheme may not generate the most accurate numeric tail for a given basis name, it is certainly far more efficient than scanning the directory for each auto-generated name.

pBasisName
Supplies a pointer to the basis name in FCB unicode format that needs to be matched.
pName
Supplies a pointer to the directory name in FCB unicode format that needs to be matched with the basis name.