473,770 Members | 5,842 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.

InitializeCompo nent().

In this function, axDTAOLFG1 gets the following treatment:
+++++
this.axDTAOLFG1 = new AxDTAOLFGLib.Ax DTAOLFG();
this.tabControl 1.SuspendLayout ();
this.tabPage3.S uspendLayout();
((System.Compon entModel.ISuppo rtInitialize)(t his.axDTAOLFG1) ).BeginInit();
this.SuspendLay out();
//GUI stuff here...

this.axDTAOLFG1 .Anchor =
((System.Window s.Forms.AnchorS tyles)((System. Windows.Forms.A nchorStyles.Top
| System.Windows. Forms.AnchorSty les.Right)));
this.axDTAOLFG1 .ContainingCont rol = this;
this.axDTAOLFG1 .Enabled = true;
this.axDTAOLFG1 .Location = new System.Drawing. Point(4238, 8);
this.axDTAOLFG1 .Name = "axDTAOLFG1 ";
this.axDTAOLFG1 .OcxState =
((System.Window s.Forms.AxHost. State)(resource s.GetObject("ax DTAOLFG1.OcxSta te")));
this.axDTAOLFG1 .Size = new System.Drawing. Size(240, 240);

//Some other GUI stuff here...

this.tabControl 1.ResumeLayout( false);
this.tabPage3.R esumeLayout(fal se);

((System.Compon entModel.ISuppo rtInitialize)(t his.axDTAOLFG1) ).EndInit();
//Breakpoint on this line.
this.ResumeLayo ut(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.I nvalidActiveXSt ateException} occurred>

And after, the activeX state exceptions were gone, replaced by:
{System.Runtime .InteropService s.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 1131

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

Similar topics

1
2229
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 their age, while getAge might return null! Something is also going wrong with my method that accepts input and returns a value (okay, it is a money conversion program!)... it is returning null! They are consistently returning the same, wrong...
2
7577
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 the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
12
2595
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
1219
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. No problem till now. But if i place an ActiveX Rich Text Box control (6.0 SP4) on a subform (even unbound) a strange thing happen.
1
8649
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. In this class is a single public method that returns the string "Hello from C sharp". My VB6 ActiveX DLL references the C# DLL (CSharpProject.dll) using the
1
2715
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 control. The problem is that sometimes the ActiveX control installs successfully and sometimes it doesn't. We have various test machines running different operating systems. On one machine, running Windows 2000, SP4, the control installs...
31
2895
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 byte); int main (int argc, const char * argv)
6
2553
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 far, because of the level of abstraction, i guess i would need to edit the prototype.js file? <script type="text/javascript" src="includes/javascript/prototype.js">
11
1620
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 reloads in the frame. (Bad) Perform the same test using Firefox
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10225
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10053
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10001
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7415
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3969
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 we have to send another system

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.