Make sure that dbghelp.dll is able to load symsrv.dll. Possibly copy both Dlls to the application folder or otherwise adjust the dynamic-link-library-search-order to ensure that symsrv.dll can be loaded.
SymFindFileInPathW returns mismatched modules and symbols
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