|
-
January 21st, 2013, 05:30 PM
#15
Re: How to call Dialog window (formed as resource) from a .DLL
 Originally Posted by Pavel_47
I can't use breakpoint inside my .DLL: when I attach to process, the breakpoint becomes inactive (empty circle with triangle and tooltip "The breakpoint will not currently be hit. No symbols have been loaded for this document").
Did you build the DLL with debugging information?
I've serched for hours on the web for a solution, but without success. Probably reason (appologize in advance for employment the word "probably") - the tool executables have no accompagniing .PDB database files.
The PDB files exist if you build the DLL with debugging information. If you did build the DLL yourself with debugging information, then the reason most likely that you cannot debug it is that the DLL that's running is not the one you built, but some other version.
Look, it's very easy.
1) Rebuild the DLL, making sure that debugging is turned on (both compiler and linker settings).
2) Start the CAD program. Make sure that your CAD program is using that same DLL you built. If the CAD program is using some other DLL that happens to have the same name, then of course you won't be able to debug the one you just built. Using Process Explorer from sysinternals.com shows you what DLL's are loaded when the program is running.
3) Set a breakpoint in the DLL function in Visual Studio.
4) Attach to the CAD program. Then do something in the CAD program that invokes the DLL function you set a breakpoint in.
5) Done.
It can't be any easier than that.
You don't need to attach to the CAD process. The other way to debug is to start the CAD program from the DLL project itself. If you know the command to start the CAD program, then enter the name there, set a breakpoint, and start debugging.
If you want proof, don't make any changes, go to your DLL project and try to debug by hitting F5 or F10. What do you see? Don't you see Visual Studio asking for the name of the application? So what is the name of the application you're trying to debug? You don't need google or hours of searching to see this -- just by accident hitting F5 or F10 would have given you a clue on how to debug a DLL project.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; January 21st, 2013 at 05:39 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|