Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it running??
Message
 
To
31/10/2003 07:19:59
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00844878
Message ID:
00845313
Views:
19
Hi Joe,

Your application can create DDE server and DDE client. Each application instance, when starting, checks whether such DDE server already exists. If it does, that means another application instance is already running.

In a similar way a synchronization object (semaphore, mutex, event) can be used. On start the application attempts to create a semaphore with predefined name. If successful it keeps running. Unsuccessful attempt means that such semaphore is already created -- another instance of this application is running.

After application terminated -- either regularly or aborted -- the semaphore is automatically released.

FoxPro sample code (members area):

Using a Semaphore object to prevent VFP application running more than one instance
http://www.news2news.com/vfp/?example=147&function=10
Previous
Reply
Map
View

Click here to load this message in the networking platform