473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ActiveX in .NET and missing properties

Hello,

I'm using an ActiveX component in my .NET application bij referencing the
DLL. Visual Studio will create a wrapper class. So far so good. The problem
is that i've not all properties avialable from the ActiveX objects that i
CAN access by using the same objects from script. Are these dynamic added
properties, and is there a way to access them?

Thanks in advance!

Eric
Jul 22 '05 #1
2 1642
Ok I got further now.

The following is working:

Assembly a = Assembly.Load("Interop.MyLib");
Type myType = a.getType("MyLib.MyObject");
myType.InvokeMethod(....); //Invoke getName()

The strange thing is I do not see the method getName() when calling
myType.GetMethods(). But when i invoke getName() by using InvokeMethod() it
is working?

Now I have another problem. Besides 'hidden' methods there is also a
variable avialable called length. How can I get the value of this variable?
The myType.GetProperty() is not working (again length is not shown when
calling GetProperties()).

Any ideas?

I tried using late binding and get the Methods by calling GetMethods() on
the type.

"Eric" <do*******@hotmail.com> wrote in message
news:42***********************@news.xs4all.nl...
Hello,

I'm using an ActiveX component in my .NET application bij referencing the
DLL. Visual Studio will create a wrapper class. So far so good. The
problem is that i've not all properties avialable from the ActiveX objects
that i CAN access by using the same objects from script. Are these dynamic
added properties, and is there a way to access them?

Thanks in advance!

Eric

Jul 22 '05 #2
Already found the solution :)

Use invokeMember() with bindingflag: BindingFlags.GetProperty.

"Eric" <do*******@hotmail.com> wrote in message
news:42***********************@news.xs4all.nl...
Ok I got further now.

The following is working:

Assembly a = Assembly.Load("Interop.MyLib");
Type myType = a.getType("MyLib.MyObject");
myType.InvokeMethod(....); //Invoke getName()

The strange thing is I do not see the method getName() when calling
myType.GetMethods(). But when i invoke getName() by using InvokeMethod()
it is working?

Now I have another problem. Besides 'hidden' methods there is also a
variable avialable called length. How can I get the value of this
variable? The myType.GetProperty() is not working (again length is not
shown when calling GetProperties()).

Any ideas?

I tried using late binding and get the Methods by calling GetMethods() on
the type.

"Eric" <do*******@hotmail.com> wrote in message
news:42***********************@news.xs4all.nl...
Hello,

I'm using an ActiveX component in my .NET application bij referencing the
DLL. Visual Studio will create a wrapper class. So far so good. The
problem is that i've not all properties avialable from the ActiveX
objects that i CAN access by using the same objects from script. Are
these dynamic added properties, and is there a way to access them?

Thanks in advance!

Eric


Jul 22 '05 #3

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

Similar topics

4
by: Filip Wtterwulghe | last post by:
Hello, We have a number of VB6 ActiveX applicationmodule(s) that are loaded into a IE6 WebBrowserControl . This WebControl is imbededded into Application X . Now We want to send a message from...
0
by: Miguel Guerreiro | last post by:
I have an ActiveX Control that I am trying to make work from an ASP page, but so far all I got is great frustation! My Control is well registered (and working fine from a VB stand-alone program I...
0
by: genc ymeri | last post by:
Hi, I'm dropping in a C# form an ActiveX MSVisio 2003. There two properties of this ActiveX components "NegotiateMenu"&"NegotiateToolBar" which being set to "true" should show up a menu and a...
1
by: Wm. Scott Miller | last post by:
I have a Custom DTS Task for SQL Server and I've got it working fine, except for when I try to access its properties from an ActiveX script. I have added a new property called Length and a method...
8
by: Alex | last post by:
Hello, I am trying to access some windows components from a web based application and I am having trouble find my way. The only solution seems to be to creat an ActiveX control to access the...
3
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add...
2
by: Eric | last post by:
Hello, I'm using an ActiveX component in my .NET application bij referencing the DLL. Visual Studio will create a wrapper class. So far so good. The problem is that i've not all properties...
3
by: =?Utf-8?B?R3JlZyBN?= | last post by:
Hello, I'm running an asp.net, intranet web application using .net framework 1.1 on IIS5.1 / 6.0. Through the web application, I would like to press a button on the web page, have another window...
1
by: miskomisko | last post by:
..net v2.0, VS 2005, VB6 Hi, I try to import my vb6 application to vb .net. The application uses my special activeX component which i want to import. When i import ocx file. Component is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...

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.