0

I have written one application in which I load one system wide crash dump using dbgeng.dll. I want to use some of the WinDbg commands like (!vad) - for that I need other dll's like exts.dll, ext.dll, kext.dll, kexts.dll. I have all these dlls and have my _NT_DEBUGGER_EXTENSION_PATH properly set. When I use the WinDbg GUI - .chain command tells me that all these dlls are loaded but when I try to do it from my code - I can't see these dlls loaded. Also when I try to load these dlls using Execute (.load....) - it throws an error - " The call to LoadLibrary('...') failed, Win32 error 0n193". I tried !load as well - both of them didn't work in my code. But everything works perfectly in GUI. I am not able to figure out how to load all these dlls in my c++ code.

Could anybody please help me out here ? I would really appreciate your help!

-arb

arb
  • 71
  • 1
  • 4

1 Answers1

0

Error 193 If you get error 193 usually means that you are trying to load 64-bit dll in a 32-bit application (or vice versa).

Make sure that you load dbgeng.dll from the same directory windbg is installed to. You will then be able to use all windbg commands via IDebugControl::Execute

John
  • 5,561
  • 1
  • 23
  • 39
  • Thanks john. I am trying to enforce the dll loading from that folder but its still loading from the system folder which I don't want. If I use SetDllDirectory in my code.. that dll is still loaded from the system directory... as the dll gets loaded before setting up the dll directory - do you have any solution for this ?? – arb May 14 '11 at 16:26
  • Load it dynamically with LoadLibrary and use GetProcAddress to get DebugCreate. – John May 14 '11 at 20:03
  • John, I am trying to debug 32bit win7 crash dump in Windows server 2008 R2 using dbgeng.dll (which is 64 bit). I am having trouble with symbols file. Whenever I do !vad -- it could not read the VAD tree as it is not able to find the symbols, though I have copied the ntdll.pdb and ntkrpamp.pdb from the VM to the server's local directory and I am pointing to it. Do you know what could be the issue ? I would really appreciate your help. Thanks – arb May 18 '11 at 13:46