[DUG] COM object question
Phil Middlemiss
phil at tumonz.co.nz
Mon May 29 14:18:04 NZST 2006
Thanks Connor,
I've used a similar method previously with another application and that
worked fine, but required that the automation class had to import
another unit for the singleton object (trying to keep it lite). I was
kinda hoping that there was a global variable in one of the VCL units,
or a Factory singleton or something that I could refer to from outside
the automation class' unit.
Cheers,
Phil.
Conor Boyd wrote:
> Override the Initialize method on your automation class and have your
> object register with some other object when each client makes the
> initial connection.
>
> Eg. You could have another singleton class in your server, which holds a
> collection of these automation objects, one for each connected client.
>
> Override the Initialize and Destroy methods on your automation class so
> that your automation objects can register and de-register with the
> collection class.
>
> HTH,
>
> Conor
>
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
> On Behalf Of Phil Middlemiss
>
> How do I get hold of an instance of an automation object?
>
> I've created an automation object class, interface, type library etc by
> using the Delphi Automation Object wizard (D6). Works fine. In the unit
> that implements the interface, the initialization section has got the
> TAutoObjectFactory.Create call. If I create the appropriate coClass in
> another app it does the right thing and starts TUMONZ and I can start
> calling methods on the automation object.
>
> But how do I get hold of that automation server object in the server
> app? In the server app I want to pass it an interface to talk to when
> it's methods are called.
>
> Cheers,
> Phil.
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phil.vcf
Type: text/x-vcard
Size: 250 bytes
Desc: not available
Url : http://ns3.123.co.nz/pipermail/delphi/attachments/20060529/91f1ac39/phil.vcf
More information about the Delphi
mailing list