Is there any way for SymInitialize and SymFromAddr methods to automatically load symbols from a custom symbol store. I'm trying to resolve an address to a readable function name using SymFromAddr(). It seems to work fine if I have symbols for the given module stored locally, however I'd like it to automatically download them from the path given to SymInitialize, just like WinDbg does it. I call SymInitialize like that:
SymInitialize(procHandle, "SRV*c:\\symbols*http://msdl.microsoft.com/download/symbols;http://mycustomstore.com/symbols", TRUE);
SymFromAddr returns error 487 "Attempt to access invalid address." as it can't find the symbol since it has never even attempted to download it.
Is there any way to force download them?
As it turned out dbghelp.dll needs symsrv.dll in order to load symbols. It was struggling to find it, so needed a bit of help. I've used dbghelp logging to help track down the issue https://msdn.microsoft.com/en-us/library/ms680687.aspx