By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

How to AddHandler to a late bounded COM Object

P: n/a
Hello

I use GetObject() to get a running Activex/COM Object.

I now want to use the Eventhandlers of the COM Object.

If want to do:

AddHandler ComObject.EventXY, addressof MyEventHandler
How can I do this with a COM Object. (Late Binded)

Thanx
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Captain Chaos" <Ca**********@nospam.com> schrieb

I use GetObject() to get a running Activex/COM Object.

I now want to use the Eventhandlers of the COM Object.

If want to do:

AddHandler ComObject.EventXY, addressof MyEventHandler
How can I do this with a COM Object. (Late Binded)


It is not possible.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

P: n/a
It is not possible.
Everything can be solved....

For example how I could do it the dirty way:

Using the VBScripting Control.
Createing a COMClass with VB.NET

Creating Code to Handle the Event via VBScript on the Fly. (beause in
VBScript you can handle Events dynamicly )
Adding the ComClass to the ScriptingControl.
Runnig the Code.

If the EVent occurs the Scripting Control Catches it
and sends it to the ComClass which is raising the Event.

That's the dirty solution I allready have.

I am 5000% sure there is an cleaner solution than this.................

"Armin Zingler" <az*******@freenet.de> schrieb im Newsbeitrag
news:uz**************@TK2MSFTNGP12.phx.gbl... "Captain Chaos" <Ca**********@nospam.com> schrieb

I use GetObject() to get a running Activex/COM Object.

I now want to use the Eventhandlers of the COM Object.

If want to do:

AddHandler ComObject.EventXY, addressof MyEventHandler
How can I do this with a COM Object. (Late Binded)


It is not possible.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

P: n/a
"Captain Chaos" <Ca**********@nospam.com> schrieb
It is not possible.
Everything can be solved....

For example how I could do it the dirty way:

Using the VBScripting Control.
Createing a COMClass with VB.NET

Creating Code to Handle the Event via VBScript on the Fly. (beause
in VBScript you can handle Events dynamicly )


Maybe, but not in VB.NET.
Adding the ComClass to the ScriptingControl.
Runnig the Code.

If the EVent occurs the Scripting Control Catches it
and sends it to the ComClass which is raising the Event.

That's the dirty solution I allready have.

I am 5000% sure there is an cleaner solution than
this.................


Your question was how to catch the events in VB.NET, not how to catch them
in VBScript, so I still say it is not possible.

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

P: n/a

Ok, you are right, thanx anyway.
"Armin Zingler" <az*******@freenet.de>
news:e1**************@TK2MSFTNGP11.phx.gbl...
"Captain Chaos" <Ca**********@nospam.com>
It is not possible.


Everything can be solved....

For example how I could do it the dirty way:

Using the VBScripting Control.
Createing a COMClass with VB.NET

Creating Code to Handle the Event via VBScript on the Fly. (beause
in VBScript you can handle Events dynamicly )


Maybe, but not in VB.NET.
Adding the ComClass to the ScriptingControl.
Runnig the Code.

If the EVent occurs the Scripting Control Catches it
and sends it to the ComClass which is raising the Event.

That's the dirty solution I allready have.

I am 5000% sure there is an cleaner solution than
this.................


Your question was how to catch the events in VB.NET, not how to catch them
in VBScript, so I still say it is not possible.

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.