Thursday, 22 August 2013

How to debug unmanaged dll in Visual studio, when we dont have source for that dll?

How to debug unmanaged dll in Visual studio, when we dont have source for
that dll?

In my application i am using the third party dll and i dont have any
soruce code avialable. Now i am getting the exception in Windows7 OS, so i
would like to debug and kwow what is the exact reason.
Reflector will not help me in this case as its a unmanaged dll. And
decompiler is giving error on passing this dll(Extraction of source code).
To debug in visual studio, it expects the PDB file and .pdb can be
generated only from source code.
In the debug section i slected "Enable Native code debugging option" and
in security section i selected the option as paritially trusted
application to get rid of the exception.
I am not able to conclude, what could be the problem and dont have any
idea apart from above, how to resolve?
On my knowlege we can not debug unmanaged dll, if we dont have source code
available.
Can any one please suggest, if we have any techniques around that.
My thought process: If i can get runtime information on which API its
failing, i could opt for alternative API and resolve the problem.
Thanks in advance.
Regards, Siva.

No comments:

Post a Comment