Debug VC++ dll?

B

Bob

Hi,
I am a vb.net programmer who has written a simple VC++ dll that I call from
my vb program.
How do you get to step into the VC code when debugging?
I have tried putting the compiled dll into the output directory of the vb
project.
I have tried setting the attach attribute under C++ project properties
debugging.
I have made sure there is only one copy of the dll when running
Alas no luck.
Is there a general series of steps / checks that I should do to get this
working?

thanks
Bob
 
J

Jochen Kalmbach [MVP]

Hi Bob!
I am a vb.net programmer who has written a simple VC++ dll that I call from
my vb program.
How do you get to step into the VC code when debugging?

1. Open the DLL-Project in VC++.
2. Put an break-point in the function you want to debug
3. Select the vb(6).exe-App in the debugging settings.
4. Start the DLL-Project => not vb(6) will fire up
5. Open your VB-Project inside the vb-IDE
6. Start your VB-Project

Now when you go into the VC++ function, your first IDE will stop at the
breakpoint.

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
O

Oleg Starodumov

I am a vb.net programmer who has written a simple VC++ dll that I call from
my vb program.
How do you get to step into the VC code when debugging?

Enable unmanaged debugging:

Project properties | Configuration Properties | Debugging | Unmanaged code debugging

Regards,
Oleg
[VC++ MVP]
 
M

Marcel Serour

Bob said:
Hi,
I am a vb.net programmer who has written a simple VC++ dll that I call from
my vb program.
How do you get to step into the VC code when debugging?
I have tried putting the compiled dll into the output directory of the vb
project.
I have tried setting the attach attribute under C++ project properties
debugging.
I have made sure there is only one copy of the dll when running
Alas no luck.
Is there a general series of steps / checks that I should do to get this
working?

thanks
Bob

try putting the vb and the dll projects under the same solution
 
B

Bob

Hi ,
Thanks to you all for contributing.
The solution turned out to be a variation on Oleg's reply.
Re Marcel's reply : the projects are already in the one solution.
The extra pieces of the puzzle are:
1) Point the C++ Project working directory to the VB Project (exe) output
directory c:\blah\bin(Proj,Config, Debug,Working)
2) Set Attach to yes (same path as above)
3) Set unManaged code debugging in the VB project as per Oleg's reply.
regards
bob
 

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

Top