How to debug a DLL?

G

Guest

Hi... I had a VC++ 6.0 application that created a DLL to be used with another
C# app. I have convered that app to VS .NET 2003 and I can build the DLL
without making any changes to the existing code. However, when this DLL is
used by my C# application I get some memory errors.

I am not too well versed with VC ++ 6.0, could anybody tell me how I can
debug this DLL (liine by line) to find where the problem is?
 
D

David Lowndes

Hi... I had a VC++ 6.0 application that created a DLL to be used with another
C# app. I have convered that app to VS .NET 2003 and I can build the DLL
without making any changes to the existing code. However, when this DLL is
used by my C# application I get some memory errors.

I am not too well versed with VC ++ 6.0, could anybody tell me how I can
debug this DLL (liine by line) to find where the problem is?

Build the debug configuration of your DLL.
Put some breakpoints in key places of your source code.
Press F5 to run it and you'll probably be prompted for the path of the
executable you want to run (presumably you'll specify the exe produced
by your C# application here).
When the program loads your DLL your breakpoints should get enabled,
and after they're hit you should be able to step through your code and
examine variables, etc in order to find your problems.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Debugging a DLL 1
Converting Activex application 1
Stepping into vc++ dll from c# 2
DLL dependencies 2
how to use VB 6 dll in VC++ 6 2
DLL DEBUG MODE IN CPP 2
calling DLL 17
Can't debug DLL 1

Top