?
Solved

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

Posted on 2003-10-23
14
Medium Priority
?
1,381 Views
Last Modified: 2013-11-26
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.
0
Comment
Question by:GivenRandy
  • 6
  • 4
  • 3
  • +1
14 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9609619
Can't you load your OCX project source code into VB6 IDE, add breakpoints, and press F5 to start it ?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9609623
Then you start MatlLab.
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 9609923
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).
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Author Comment

by:GivenRandy
ID: 9610051
I get this error:

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

It should have recognized it (I selected the "Start Component" option).
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 800 total points
ID: 9610933
Maybe that Matlab may not reference a virtually registered component! Not all application can do it!
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9613544
have you set binary compability on your OCX?
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9613551
and then use project group
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 9613622
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.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9613634
Ooops, What is the error anywaqy?
0
 
LVL 28

Assisted Solution

by:AzraSound
AzraSound earned 400 total points
ID: 9615387
On the debugging tab, you usually select "Wait for components to be created" in these scenarios (or maybe it only applies to ActiveX DLLs).  Can you run your ActiveX DLL and debug in this manner?
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 9616413
I tried that, too. It is not acting "normal" (which is not unusual for MATLAB, from my experience).
0
 
LVL 26

Assisted Solution

by:EDDYKT
EDDYKT earned 800 total points
ID: 9618705

On debugging tab

Can you use start program with  your exe on the box?
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 9626997
I tried starting the program with the exe as well, same result.
0
 
LVL 9

Author Comment

by:GivenRandy
ID: 9627008
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question