I'm guessing but I would say that it is something to do with when CoInitialize/OleInitialize is called. You could prove this by calling CoInit in you app startup. If the first client then starts a new instance, then I'm right. >From: Andrew Cammell <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: Multiple recipients of list delphi <[EMAIL PROTECTED]> >Subject: [DUG]: COM problems >Date: Thu, 18 Nov 1999 12:53:45 +1300 > >Hi Everyone, > >We have a COM client which is using ole automation to access a COM single >instance server. When you start the client, it automatically starts the >server exe, as expected. When you quit the client, it automatically quits >the server exe, as expected. Now, if you start the server exe first so >that >it already exists, then start the client, it connects correctly. When you >quit the client, the server stays behind, as expected, because it already >existed before the client started. >The problem is if you now start the client again with this same server >still >running, a second instance of the server now starts. This is because the >server is single instance, so only one COM object can exist per server exe. >The question is, why does the client connect to the existing server the >first time, but can't seem to see it the second time and so starts another >server? > >Regards, > >Andrew Cammell >Postec Data Systems Ltd >--------------------------------------------------------------------------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz