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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
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
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi



begin:vcard
fn:Phil Middlemiss
n:Middlemiss;Phil
org:Vision Software, MTS Ltd
email;internet:[EMAIL PROTECTED]
title:Project Leader
tel;work:+64 7 3480001
tel;cell:+64 27 4592648
x-mozilla-html:TRUE
url:http://www.tumonz.co.nz
version:2.1
end:vcard

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to