How do I debug my C++ DLL

I have a project that for a PocketPC that consists of a VB app and a C++ DLL. I have the source code for the DLL. I have created a solution with both the DLL and the VB code projects. Both compile ok.

I am having two problems-

1) I am having trouble deploying the compiled DLL to the emulator. I have added the DLL to the VB project and it is marked as content, but it is not being copied to the project folder in the emulator. This used to work in VS 2003. I have had to deploy the DLL from within the DLL project. This put it in a separate folder. I then copied it to my apps folder in the emulator. Can anyone tell me why it is not being deployed properly along with my vb app?

2) The bigger problem is that I haven't figured out how to debug the DLL. When I put breakpoints in the C code, they are ignored. I can break in the VB code. Somewhere, I read that I need to open two VS2005 apps, and use one to debug the DLL and the other for VB, but I can't figure out where I read that and haven't been able to get it to work. Anyone successfully debugged a combination of managed and unmanaged apps?

Thanks mucho for your help!

[1140 byte] By [csann] at [2008-2-1]
# 1
For issue 1.
After adding the DLL as content, make sure that the "Copy To Ouptut Directory" is set to copy the file over. By Default this should only be copied the first time you try to deploy after building the DLL.

For 2.
To Debug your Native DLL, you'll need to use the Native Project and tell VS to use the VB .exe as the remote executable, unhappily we don't have Com Interopt support in VS2005 to be able to simlessly debug managed and Native.
To do that:
Project/Properties/Debugging
Set the "Remote Executable" to point to the .exe of the created VB Project and any "Command Arguments" that are needed and hit F5.

MarioChenier at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 2
Mario

Thanks for your reply.

I have tried the technique but I am still having a problem. I am setting a breakpoint in my DLL before starting to debug. After using your technique to start the debugger, the debugger tells me that it cannot debug my DLL because symbols are not loaded. The little red circle that marks a breakpoint changes to a hollowed out circle. How do I get symbols properly loaded for my C++ files?

Clark

csann at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 3
hi, if I may just ask... how did you "(add) the DLL to the VB project" so that it was "marked as content"? I'm a beginner and don't even know how to do that. :-) Also, when you deployed your dll within the dll project, did you see the dll file in the project folder in the emulator? Mine's just an empty folder.. Thanks!
-- I got the answer here >> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=127332&SiteID=1
slwkidd at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...