SymFindFileInPathW returns mismatched modules and symbols

p_jaholkowski 41 Reputation points
2020-09-10T15:51:52.513+00:00

According to https://video2.skills-academy.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-symfindfileinpathw

BOOL IMAGEAPI SymFindFileInPathW(
HANDLE hprocess,
PCWSTR SearchPath,
PCWSTR FileName,
PVOID id,
DWORD two,
DWORD three,
DWORD flags,
PWSTR FoundFile,
PFINDFILEINPATHCALLBACKW callback,
PVOID context
);

function should return matched pdb and dll when flag SYMOPT_EXACT_SYMBOLS is set through SymSetOption

I have been trying:
DWORD symOptions = SymGetOptions();
symOptions |= SYMOPT_EXACT_SYMBOLS;
symOptions |= SYMOPT_CASE_INSENSITIVE;
SymSetOptions(symOptions);

and despite of that first found record which comes through callback returns umatched record.
I tried version 6.3.9600.17336 and 6.2.9200.20512 and it still does not work.

Either documentation is incomplete or there is error in that function.
To reproduce problem you need local symbol store which several versions of one file

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,498 questions
{count} votes

0 additional answers

Sort by: Most helpful