Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API Function Call to determine who has an NT resource op
Message
De
05/05/1999 13:58:42
 
 
À
05/05/1999 13:28:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00215413
Message ID:
00215435
Vues:
28
>Looking for an API call, or set of calls that I can select a particular file on my NT server, and determine who has that file open. Attempting to ease things up for our Database techs. Currently they can look into Server Manager, but this can be difficult when there are 35 seesions open and 2500+ open resources.
>

You can use NetFileEnum() at level 3 (it returns FILE_INFO_3 structures) to write a procedure to look for a file and list the users accessing it, but it only works from NT, and you must have account operator or supervisor privileges to use it. It is not entirely trivial to write, and you'll need a memory management class like Paul Tatavu's POINTERS class or my CLSHEAP class to handle the structures for you.

There may be sample code using POINTERS available in the FAQ or for download.

>I have been looking everywhere for this type of control or code, but have had no luck.
>
>TIA
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform