Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging OCX and DLL code simultaneoulsy 1

Status
Not open for further replies.

LonniePurvis

Programmer
Sep 11, 2002
5
US
I have written a dll that is referenced from my ocx code. What I would like to do is run the ocx and dll in debug mode at the same time. When the code references the dll, I would like to step through the dll code.

I have tried to do this two ways: 1. Setting the dll project to debug using a specific html (the one my ocx starts up in debug) and 2. Setting it to wait for components to be created. In both instances I recieve the following error

Run-time error '430': Class does not support Automation or does not support expected interface.

Anybody know how to do this?
 
If I understand you correctly, you have created both an ActiveX control project (ctl file) and an ActiveX DLL project (cls file), which compile to an ocx and dll respectively, and you want to step between projects.

Create a new standard exe project. Select File/Add project. Add your ActiveX control project. Set a reference to its control (it will be a .vbp file, rather than an OCX file).
Do the same with your ActiveX DLL; don't forget to set a reference, and make sure you aren't referencing the compiled version.
Now, draw an instance of your control on the form in the Standard EXE project. When you run the program, you'll get cross-project debugging.

Finally, it will help to understand how the different error trapping settings work in tools/options.

HTH

Bob
 
Look into setting up a Project Group. I believe that is what BobRodes is referring to.

Take Care,

zemp

"If the grass looks greener... it's probably because there is more manure."
 
Yes, that's exactly what I'm referring to, thanks Zemp. I got so caught up in the explanation, I forgot what I was explaining! You'll want to save the result of adding projects together as a project group.

One final thing: it can be a little hard to keep track of whether your reference points to the compiled version of your ocx or dll, or the vbp file that allows you to step through the code. I suggest that you keep your project files in a directory with a short pathname; why should become clear as you work with it.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top