简体   繁体   中英

monitoring a dll

I am working with two programs that make use of the same dll file. Code of the first program is lost, and the second program is what i am writing. The dll in question is used as some kind of wrapper dll

Well the two programs go most of the time fine together. However sometimes there is a conflict, and so the programs halts. By trial and error i am now convinced that it has something to do with those 2 programs calling this dll (just for the record there is also a third program using the dll but we disabled that program). It must have something to do with how both programs use the dll.

So i was wondering, is there some tool that would allow me to monitor a dll And show me how it is called;
what functions was called; showing the parameters; and if it wasnt a void what the returned type and result was.

Normally i would do this through visual studio tracing step by step through the code. But since code for the first program (including that dll) got lost. i cannt trace it, i'd like to debug what happens and then if i know the error situation then build something in my new program to prevent this from happening again.

If this DLL is a .NET one then you can use .NET Reflector or dotPeek (www.jetbrains.com) to decompile it. Then you can add your trace code and compile it again. You can also add trace code by using PostSharp ( http://www.sharpcrafters.com ).

If it's not a .NET dll then you can still debug it using any other assembler debugger ie http://www.ollydbg.de

If you have the source code, and the .pdb files in your BIN directory, then you can debug through that code. However, You will need to enable external code debugging in Visual Studio.

You can then check on the dll in the menu Debug--> Windows --> Modules.

Navigate to the dll and see if there are any issues with the symbol file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM