Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check whether or not Exe is in use
Message
De
16/02/2009 08:30:43
 
 
À
13/02/2009 14:41:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01381527
Message ID:
01382054
Vues:
51
>>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?
>
>Maybe Thread#1374298 could help.

Thanks for the link to this recent thread. That link ultimately leads to Sergey's http://www.berezniker.com/content/pages/visual-foxpro/who-has-files-open-network, but it is of no use in my situation, as it produces an 'Access denied' message. That is normal and predicted behavior by the way, because in my situation the user is not an Administrator. The user running this program must be a member of the Administrators or Account Operators local group. (I'm not sure what 'Account Operators local group' exactly means.)

I wonder why Microsoft decided to unveil such information only to Administrators.
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform