Solved

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

Posted on 2003-10-23
14
1,363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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 200 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 100 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 200 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

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!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 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