Dll only loads correctly via LoadLibrary?

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-04-28T16:22:20Z Indexed on 2010/04/28 17:23 UTC
Read the original article Hit count: 199

Filed under:

I'm trying to use dbghelp.dll. If I set it up in the VS2008 properties to point to the correct library and header file, and put dbghelp.dll in the same directory as the executable, one of the functions in the dll fails. If I LoadLibrary the dll, everything that function works. I've looked at the header that gets included via the VS option, and the right one is being pulled in. The correct lib is being pulled in (checked via /verbose option), and depends.exe shows the correct dll is loaded. Does anyone know why I can't get this to work? I'll probably just go with LoadLibrary, but I'm genuinely stumped on this one.

EDIT: SymfromAddr fails with an "error 87", whatever that is. If I load the dll via LoadLibrary, it works.

© Stack Overflow or respective owner

Related posts about c++