Performs a case-sensitive search for long spaces and case-insensitive search for all the other namespaces for a pattern in a string.
#include <smsutapi.h> int NWSMMatchName ( UINT32 nameSpaceType, void *pattern, void *string, NWBOOLEAN returnMatchToPatternEndIfWild);
(IN) Specifies the name space type of string and pattern. (see nameSpaceType Values).
(IN) Points to the pattern to search for (see Wildcard Values).
(IN) Points to the string to search.
(IN) Specifies whether string is a directory path:
The following table lists the return values associated with the function.
NWSMMatchName also supports strings in UTF-8 format.
Wild card matching is allowed if the name space supports it.
NWSM_MATCH_TO_STRING_END is returned if string matches the first part of pattern.
NWSM_MATCH_TO_PATTERN_END is returned when part of string matches pattern exactly. For example, when pattern is set to "*ted" and string is set to "sorted_i."
returnMatchToPatternEndIfWild allows NWSMMatchName to return the correct return value for directory paths that matches a pattern to its end.
UINT32 nameSpaceType = DOSNameSpace; char patternBuf[15], stringBuf[15]; /* Arbitrary size.*/ STRING pattern = patternBuf, string = stringBuf; strcpy(pattern, “?es*.*”); strcpy(string, “test.exe”); NWSMMatchName(nameSpaceType, pattern, string, TRUE);