Solved

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

Posted on 2003-10-23
14
1,360 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

776 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