Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A New Twist On Is App Running
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00409058
Message ID:
00409227
Views:
29
>>Hello,
>>
>>But what is wrong then with the code i send?
>
>First, there has to be a common directory that's writable and this directory muse exist on every machine that uses the application. You could rely on the current default, however. Unfortunately, if the setup of the drive (on a network for example) is such that the user only has read access, but not write, you're back at square one. Second, if you're out of disk space or some other error occurs in attempting to create the file, the program may not run when it should.

>There are a number of ways to accomplish this: Set up the program as a DDE server iterate through all open windows, create a mutex or event, use the method you posted. If it works for you, fine with me. However, I would prefer a method that was 100% reliable, and 99.99% isn't 100%.

In my case the directory where the file will be created is in the directory where i store my temporary files. So if there is no write access then there is a starting my app even when i use ed's code.
If you run out of space then you have the same issue. Then my temporary files couldn't also be created.
So, in that 0.01% you mention my app must tell the user to clean up the system first.
I think that it is 100.00 % save if i put the diskcheck code before it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform