Platform SDK: Debugging and Error Handling

SymMatchFileName

The SymMatchFileName function compares a string to a file name and path.

BOOL SymMatchFileName(
  PSTR FileName,
  PSTR Match,
  PSTR *FileNameStop,
  PSTR *MatchStop
);

Parameters

FileName
[in] Pointer to the file name to compare to the Match parameter.
Match
[in] Pointer to the string to compare to the FileName parameter.
FileNameStop
[out] Receives a pointer to the location in FileName where matching stopped. For a complete match, this value can be one character before FileName. This value can also be NULL.
MatchStop
[out] Receives a pointer to the location in Match where matching stopped. For a complete match, this value may be one character before Match. This value may be NULL.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

Because the match string can be a suffix of the complete file name, this function can be used to match a plain file name to a fully qualified file name.

Matching begins from the end of both strings and proceeds backward. Matching is case-insensitive and equates a backslash ('\') with a forward slash ('/').

Requirements

  Windows NT/2000: Requires Windows 2000. Available as a redistributable for Windows NT 4.0.
  Windows 95/98: Requires Available as a redistributable for Windows 98.
  Header: Declared in Dbghelp.h.
  Library: Use Dbghelp.lib.

See Also

Debug Help Library Overview, DbgHelp Functions