Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting multiple instances of FPD26
Message
From
11/09/1999 06:31:47
 
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00263532
Message ID:
00263634
Views:
23
Ed: Thanks. Why didn't I think of that.
Spencer

>I am running FPD26 under Win98 with no problems. Is there a way to have FPD26 detect whether a previous instance of the program is running?
>>Thanks for your help.
>
>You obviously can't use any of the Win32 API calls, since it's DOS. One trick I've used in the past is to use FCREATE to open a file for low-level I/O in a fixed, known location; if it returns a -1, then either it's already opened by someone, or you don't have the necessary rights to create a file where you've specified (ie you tried writing to a CD, or a network drive where you only have read permissions.
>
>Leave the file open as long as the app is running; when FPDOS exits, it'll close the file and the next FPDOS session will be able to do the FCREATE
>
>
>>SFried
Previous
Reply
Map
View

Click here to load this message in the networking platform