473,500 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange and consistent ActiveX problem

Hello, all.

After trying to wade through a great deal of undocumented and
uncommented code in order to speed up a frame capture rate, I've
decided that, for my sanity and that of my boss and any coders to
follow me, I should start over and write it myself.

I reuse a great deal of the old code, but I can't really get much
further until I get the passthrough working (Passthrough is the 'live'
video feed captured by the camera and card).

Even though the old version I'm basing this project off works first
time, every time, I can't get the ActiveX control to work without
taking action in the debugger.

First, I have this control, axDTAOLFG1. I've made sure the references
for it exist (Removed them, recompiled, re-added the refs, recompiled
again), declared it, assigned it, made it load into a picture box.

But it doesn't work, and I've traced the values for the control from
the old code and the new code, and found where the new code fails.

InitializeComponent().

In this function, axDTAOLFG1 gets the following treatment:
+++++
this.axDTAOLFG1 = new AxDTAOLFGLib.AxDTAOLFG();
this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.a xDTAOLFG1)).BeginInit();
this.SuspendLayout();
//GUI stuff here...

this.axDTAOLFG1.Anchor =
((System.Windows.Forms.AnchorStyles)((System.Windo ws.Forms.AnchorStyles.Top
| System.Windows.Forms.AnchorStyles.Right)));
this.axDTAOLFG1.ContainingControl = this;
this.axDTAOLFG1.Enabled = true;
this.axDTAOLFG1.Location = new System.Drawing.Point(4238, 8);
this.axDTAOLFG1.Name = "axDTAOLFG1";
this.axDTAOLFG1.OcxState =
((System.Windows.Forms.AxHost.State)(resources.Get Object("axDTAOLFG1.OcxState")));
this.axDTAOLFG1.Size = new System.Drawing.Size(240, 240);

//Some other GUI stuff here...

this.tabControl1.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);

((System.ComponentModel.ISupportInitialize)(this.a xDTAOLFG1)).EndInit();
//Breakpoint on this line.
this.ResumeLayout(false);
+++++

I put a breakpoint on the .EndInit() line, and found out something very
strange.

In the old code, just prior to this line, many fields of the axDTAOLFG1
control (in the debugger) were filled with:
<error: an exception of type:
{System.Windows.Forms.AxHost.InvalidActiveXStateEx ception} occurred>

And after, the activeX state exceptions were gone, replaced by:
{System.Runtime.InteropServices.COMException} System.Runtime.InteropServices.COMException

Which would allow the frame capture to run.

For the new code, I could not get this to happen unless I was looking
at (expanded the tree) a particular part of the axDTAOLFG1 values in
the debugger.
The parts I must have open is
axDTAOLFG1
->System.Windows.Forms.AxHost
->System.Windows.Forms.Control

Anything less than the .Control, and it doesn't work.

This is clearly unacceptable behavior for an application. Would someone
please help me fix this problem/explain what the debugger is doing so I
can replicate it and get this part working 'magically'? (Yes, I know
that handwaving and relying on inexplicable things to accomplish a goal
are horrible...)

Thanks in advance!

Feb 24 '06 #1
0 1108

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2215
by: Mattt | last post by:
Hi, I've run into a rather odd problem. get Methods seem to return values from the wrong methods! For example, let's pretend my activex control stores values about a person. getName would return...
2
7555
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
12
2551
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
0
1203
by: john | last post by:
Rich Text Box in Access form Hello: For example i have to tables in access: PERSON and ADDRESS in a one to many relation. And now i want to have a main PERSON form with a subform ADDRESS on it....
1
8609
by: Craig | last post by:
I am having problems getting an ActiveX DLL written in VB6 to call a method in a C# class library component. My C# DLL is called CSharpProject.dll and contains a public class called CSharpClass....
1
2698
by: Steve | last post by:
I am having an issue deploying an ActiveX control. This is a .NET project in C#. The ActiveX control is written in VB6. I use the PDW (Package and Deployment Wizard) to create a .CAB for the...
31
2825
by: gamehack | last post by:
Hi all, I've been testing out a small function and surprisingly it does not work okay. Here's the full code listing: #include "stdlib.h" #include "stdio.h" char* escaped_byte_cstr_ref(char...
6
2527
by: libsfan01 | last post by:
Hi all Im trying to use prototype for an xmlhttprequest, but it doesn't seem to be working cross-browser. Is there someway of getting it to be IE6 compatible (active x)? here's my code so...
11
1589
by: ft310 | last post by:
Use Internet Explorer go to http://rhodeisland-aa.org/tester/meetings/index.htm On the left click "and go to meetings" Click any address in the right hand 'location' column. The entire page...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.