Have a look at Mutex's - start with createmutex, it is in the winapi help.
This will allow you serialise access to anything you wish between your
apps.
-----Original Message-----
From: INTERNET:[EMAIL PROTECTED]
Sent: Monday, May 31, 1999 7:36 PM
To: Multiple recipients of list delphi
Subject: [DUG]: Two Delphi programs need a single source
I hope someone has some ideas as I'm stuck.
I have a situation where two delhi programs need to obtain an incrimenting
unique ID number from the single source.
So an example.
Delphi progrm 1 processes and gets unique ID 1000
Delphi program 2 processes and gets inque ID 1001
Delphi progrm 1 processes and gets unique ID 1002
Delphi program 2 processes and gets inque ID 1003
Delphi progrm 2 processes and gets unique ID 1004
Delphi program 2 processes and gets inque ID 1005
and so on....
So it's reasonably easy to use a single ini file or share a registry entry
but what hapens when both programs want to get a unique ID at the same
time.
In future I'll have more delhi programs that need to get the uniqie ID form
the same source.
Thanks for any help.
Jason Webb
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
----------------------- Internet Header --------------------------------
Sender: [EMAIL PROTECTED]
Received: from mail.corporate.co.nz (corporate.co.nz [202.37.181.1])
by arl-img-12.compuserve.com (8.8.6/8.8.6/2.18) with ESMTP id
TAA03625
for <[EMAIL PROTECTED]>; Mon, 31 May 1999 19:36:17 -0400
(EDT)
Received: by mail.corporate.co.nz from localhost
(router,SLMail V3.2); Tue, 01 Jun 1999 12:39:09 +1200
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sender: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
From: "Jason Webb" <[EMAIL PROTECTED]>
Subject: [DUG]: Two Delphi programs need a single source
Date: Tue, 1 Jun 1999 11:33:21 +1200
Message-ID: <000401beabbd$f8ac4280$010064c0@agclwork1>
MIME-Version: 1.0
Content-Type: text/plain;charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
In-Reply-To: <[EMAIL PROTECTED]>
X-Server: VPOP3 V1.3.0b Unregistered
X-SLUIDL: AC434673-176911D3-8F690000-E853E28F
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz