Link to home
Start Free TrialLog in
Avatar of GivenRandy
GivenRandy

asked on

Debug OCX / DLL Without Using Project Group (with MATLAB)

I have an ActiveX OCX, which is merely a wrapper for an ActiveX DLL, that I want to debug. I am instantiating it in a MATLAB environment. If I fire up the compiled OCX, all works well. However, how do I get to debug in the OCX (I cannot make it a part of a VB project group because the MATLAB is a separate EXE environment). When I try it, when the MATLAB tries to fire up the OCX, it generates an error that the OCX could not be created.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Can't you load your OCX project source code into VB6 IDE, add breakpoints, and press F5 to start it ?
Then you start MatlLab.
Avatar of GivenRandy
GivenRandy

ASKER

Yes, but when MATLAB tries to start an instance, it says that it cannot do it. When it is compiled, it works fine (the compiled component is registered). In other cases, when debugging in VB as a group, it handles using the debug version. However, MATLAB seems to think that the compiled one is not registered and the debug one is non-existant. There is probably something simple in the setup that I am forgetting (I thought that I had done this before).
I get this error:

>??? Error using ==> actxcontrol
>Control creation failed.

It should have recognized it (I selected the "Start Component" option).
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
have you set binary compability on your OCX?
and then use project group
EDDYKT, it is not part of a group nor can it be added (unless I am missing something). The MATLAB is an outside executable from a third-party.
Ooops, What is the error anywaqy?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried that, too. It is not acting "normal" (which is not unusual for MATLAB, from my experience).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried starting the program with the exe as well, same result.
Although I would like to get a solution that worked, it very likely is a MATLAB problem (as mentioned above). I will offer more points as needed.