Re: getting an event handler from a active-x dll dispinterface
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Dec 2006 15:46:26 +0100
"HanslH" <no@xxxxx> wrote in message
news:201uo25ruadn1ck40tbknkui1aaj6i7m1s@xxxxxxxxxx
[...]
The events-object(?) is formulated in the wrapper something like this:
=======================================
SomelEvents = dispinterface
['{blablabla}']
procedure Youhaveamessage; dispid 1;
end;
========================================
How do I use this in delphi?
You write your own class that implements this interface, create an
instance of it, and register it with the object abstracting the
device through its interface.
When the device object wants to fire an event, it calls the
'YouHaveAMessage' method through the interface reference you
gave it.
It's not very different from having a component class and setting
an event handler (a property) to a method reference in probably your
form class, only _everything_ is done through interfaces. That way,
your (and their) classes don't need to derive from known base classes.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- References:
- Prev by Date: Re: local to screen
- Next by Date: Re: local to screen
- Previous by thread: getting an event handler from a active-x dll dispinterface
- Next by thread: Re: getting an event handler from a active-x dll dispinterface
- Index(es):
Relevant Pages
|