[fpc-pascal] support for using an activex

Roberto Padovani padovani.r at gmail.com
Wed May 25 13:17:41 CEST 2011


2011/5/24 Ludo Brands <ludo.brands at free.fr>:
> The following delphi articles should help creating an event sink:
>
> http://www.informit.com/articles/article.aspx?p=130494&seqNum=5  This is an
> interesting one since it is written for Delphi 3-4 which missed a lot of the
> automated COM handling. This is much closer to where fpc is now.
>
> http://www.blong.com/Conferences/IConUK2000/DelphiMoreAutomation/More%20Auto
> mation%20In%20Delphi.htm#HandcraftedEventSink
>
> A good intruduction to connectable objects:
> http://www.gtro.com/delphi/comevents_e.php
>

Thanks a lot!

I'm reading it all and writing some code.
But in all of those docs there the "InterfaceConnect" routine is
used....but I can't find it anywhere.
Besides, is there something to convert the tlb to pascal? Or shall I
do it manually?

I might be wrong, but it seems to me that it should be possible to
write a general TSimpleEventSink class which does most of all the COM
work, and exposes a pascal-standard event management.
The TSimpleEventSink class might have an Events property which is a
dynamic array of TNotifyEvents; the client could resize it and link
its event handlers. At the same time the TSimpleEventSink reacts to
the server events by mapping the dispid's to the Events array index,
up to its current maximum dimension.

Well, I'm still quite confused.... besides the missing
InterfaceConnect method, is there any freepascal example available?
On the web I can only find delphi ones.

Thanks,

  Roberto



More information about the fpc-pascal mailing list