Export (0) Print
Expand All
Expand Minimize

SymMatchFileName function

Compares a string to a file name and path.

Syntax


BOOL WINAPI SymMatchFileName(
  _In_       PCTSTR FileName,
  _In_       PCTSTR Match,
  _Out_opt_  PTSTR *FileNameStop,
  _Out_opt_  PTSTR *MatchStop
);

Parameters

FileName [in]

The file name to be compared to the Match parameter.

Match [in]

The string to be compared to the FileName parameter.

FileNameStop [out, optional]

A pointer to a string buffer that 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, optional]

A pointer to a string buffer that 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 ('/').

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

To call the Unicode version of this function, define DBGHELP_TRANSLATE_TCHAR.

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

Dbghelp.h

Library

Dbghelp.lib

DLL

Dbghelp.dll

Unicode and ANSI names

SymMatchFileNameW (Unicode) and SymMatchFileName (ANSI)

See also

DbgHelp Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft