[DUG] Apartment model - identifying calling process
Conor Boyd
Conor.Boyd at trimble.co.nz
Wed May 31 11:06:06 NZST 2006
Yup, all good stuff.
We sort of do that too.
We use the extra parameter mentioned origally as a session key idea
though for the client.
Cheers,
C.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of Phil Middlemiss
Actually, after thinking about it a bit more, I've decided to change to
a better design and require each calling app to ask for their own
ILayerManager which will create a unique TAutoIntfObject for them. They
then use that layer manager to make the call to AddLayer etc.
As an added bonus, I have fewer threading concerns with it.
Conor Boyd wrote:
> I'd be interested to see if anybody comes up with one.
>
> We've gone down the extra parameter route, and use that to locate some
> client-specific state/context that we maintain on the server.
>
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz
> [mailto:delphi-bounces at ns3.123.co.nz]
>
> I'm using the Apartment threading model for an out-of-process
> automation object.
>
> Say the automation object has a method called AddLayer - is there any
> way, without requiring extra parameters to be passed, to identify
> which process is calling that method? That is, are there any COM
> methods to ask for an ID for the current caller using the COM object's
thread?
More information about the Delphi
mailing list