I have read a heap of papers, trying to get a grip of this stuff. 

To Summaries, just in case I am missing something
1 .Create a both threaded object which created a list ( array or threadsafe
TList ?) of created connections, Call this CoCreateFreeThreadedMarshaller
method

2. Save the object in an Application variable

3. Each page calls the object created above which returns an available
interface to the connection ?

I am off to Dallas again, so will have 20hours of traveling to do some more
reading.

Thanks Neil


-----Original Message-----
From: Myles Penlington [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 16 May 2000 16:02
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Thread and ASp



> I had considered the creating an application connection pool of my own,
> but
> then I really do need to control access and was not too sure if I need to
> marshal the interface pointers etc (ie I became confused)
> 
It is easier than you think. 
No COM will do the correct marshalling for you.
You just keep an array of objects (actually I keep the COM Interface
objects). I Check the actual refCount from the IUnknown interface to
determine if the object/connection with the least load (or free).

The only trick required is to aggregate the COM FreeThreaded Marshaller
using a call to CoCreateFreeThreadedMarshaller.

Myles.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to