Skip to content

Latest commit

 

History

History
187 lines (134 loc) · 6.12 KB

nf-dbghelp-symfindfileinpath.md

File metadata and controls

187 lines (134 loc) · 6.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:dbghelp.SymFindFileInPath
SymFindFileInPath function (dbghelp.h)
The SymFindFileInPath function (dbghelp.h) locates a symbol file or executable image.
SSRVOPT_DWORD
SSRVOPT_DWORDPTR
SSRVOPT_GUIDPTR
SymFindFileInPath
SymFindFileInPath function
SymFindFileInPathW
_win32_symfindfileinpath
base.symfindfileinpath
dbghelp/SymFindFileInPath
dbghelp/SymFindFileInPathW
base\symfindfileinpath.htm
Debug
f85d8cd9-958a-490a-b155-3a9abdeda922
08/04/2022
SSRVOPT_DWORD, SSRVOPT_DWORDPTR, SSRVOPT_GUIDPTR, SymFindFileInPath, SymFindFileInPath function, SymFindFileInPathW, _win32_symfindfileinpath, base.symfindfileinpath, dbghelp/SymFindFileInPath, dbghelp/SymFindFileInPathW
dbghelp.h
Windows
SymFindFileInPathW (Unicode) and SymFindFileInPath (ANSI)
DbgHelp.lib
DbgHelp.dll
Windows
DbgHelp.dll 5.1 or later
19H1
SymFindFileInPath
dbghelp/SymFindFileInPath
c++
APIRef
kbSyntax
DllExport
DbgHelp.dll
imagehlp.dll
SymFindFileInPath
SymFindFileInPath
SymFindFileInPathW

SymFindFileInPath function

-description

Locates a symbol file or executable image.

-parameters

-param hprocess [in]

A handle to the process that was originally passed to the SymInitialize function.

-param SearchPath [in, optional]

The search path. This can be multiple paths separated by semicolons. It can include both directories and symbol servers. If this parameter is NULL, the function uses the search path set using the SymSetSearchPath or SymInitialize function.

-param FileName [in]

The name of the file. You can specify a path; however, only the file name is used.

-param id [in, optional]

The first of three identifying parameters (see Remarks).

-param two [in]

The second of three identifying parameters (see Remarks).

-param three [in]

The third of three identifying parameters (see Remarks).

-param flags [in]

The format of the id parameter. This parameter can be one of the following values.

Value Meaning
SSRVOPT_DWORD
0x0002
The id parameter is a DWORD.
SSRVOPT_DWORDPTR
0x0004
The id parameter is a pointer to a DWORD.
SSRVOPT_GUIDPTR
0x0008
The id parameter is a pointer to a GUID.

-param FoundFile [out]

A pointer to a buffer that receives the fully qualified path to the symbol file. This buffer must be at least MAX_PATH characters.

-param callback [in, optional]

A SymFindFileInPathProc callback function.

-param context [in, optional]

A user-defined value or NULL. This value is simply passed to the callback function. This parameter is typically used by an application to pass a pointer to a data structure that provides some context for the callback function.

-returns

If the server locates a valid symbol file, it returns TRUE; otherwise, it returns FALSE and GetLastError returns a value that indicates why the symbol file was not returned.

-remarks

The identifying parameters are filled in as follows:

  • If DbgHelp is looking for a .pdb file, the id parameter specifies the PDB signature as found in the codeview debug directory of the original image. Parameter two specifies the PDB age. Parameter three is unused and set to zero.
  • If DbgHelp is looking for any other type of image, such as an executable file or .dbg file, the id parameter specifies the TimeDateStamp of the original image as found in its PE header. Parameter two specifies the SizeOfImage field, also extracted from the PE header. Parameter three is unused and set to zero.
All of these values can be obtained by calling SymSrvGetFileIndexInfo.

When searching a directory, this function does not verify that the symbol identifiers match by default. To ensure the matching symbol files are located, call the SymSetOptions function with SYMOPT_EXACT_SYMBOLS.

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.

-see-also

DbgHelp Functions

SymFindFileInPathProc

SymInitialize

SymSetSearchPath

SymSrvGetFileIndexInfo