Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API to get files open in a dir. of server by a SERVER ap
Message
From
16/01/2006 11:57:11
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01086810
Message ID:
01087216
Views:
14
Hi Borislav,

I know you said "not very well tested" < s >

First, the word "NULL" in MS seems as mis-used as the word "cursor" is in VFP < s >.
I have been using a null STRING (i.e. "") for ServerName and UserID and it works fine but still ONLY for network users!

I did try yours as-is and still no joy... it does report 1 local user, for a directory.
I also tried specifying the tcBasePath, because I do need to specify a directory, and in that case it reports nothing at all.

Interestingly, if I connect on the local system using a mapped directory, it does provide a list when run as you had it. And still nothing at all if I try specifying the mapped name for tcBasePath.

I'd say this API is specific for NET files only, based on observation.

cheers, and THANKS for the try.

>>Hi all,
>>
>>I've found the FAQ to get files in use in a directory of a server.
>>But that only lists shares opened by OTHER network workstations (uses NetFileEnum).
>>
>>I also want to get a list of files opened in the same directory by anything running on the server itself and I don't need a userID or an application name, but just to know open file names. I do not have anything to identify a specific application/process. What API would I use for that?
>>
>>Thanks in advance.
>
>Jim,
>MSDN said:
>servername
>[in] Pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
>
>basepath
>[in] Pointer to a string that specifies a qualifier for the returned information. If this parameter is NULL, all open resources are enumerated. If this parameter is not NULL, the function enumerates only resources that have basepath as a prefix. (A prefix is the path component up to a backslash.)
>
>username
>[in] Pointer to a string that specifies the name of the user. If this parameter is specified, username serves as a qualifier for the enumeration. The files returned are limited to those that have user names matching the qualifier. If this parameter is NULL, no user-name qualifier is used.
>
>So try this version :o)
SNIP>
>not very well tested
Previous
Reply
Map
View

Click here to load this message in the networking platform