Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check whether or not Exe is in use
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01381527
Message ID:
01381556
Views:
57
>>>>Using FOPEN('some.exe',1) to check whether or not the exe is in use will give accurate results if the folder is readwrite. If fopen() succeeds, then the exe is not in use. If fopen() fails, then the exe is in use.
>>>>
>>>>However, if the folder is readonly fopen() will always fail, even if it is not in use.
>>>>
>>>>Is there another way (preferably an API) that can tell whether or not the exe is in use, no matter by whom or by what process?
>>>
>>>Enumerate the running processes instead
>>>http://www.news2news.com/vfp/?function=-1&example=164
>>
>>Will this also work for an EXE that is on the network and used by others on the network?
>
>You could run the code server-side.

Ah, but that's a problem here. The 'superuser' who has to check isn't a network administrator and has readonly access to the app-folder. He is able to see who are logged in (that's info in a table), but if some of those users crashed then that info becomes misleading. That's why I need an additional check.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform