Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any API call to get the Base path from a UNC path?
Message
From
27/01/1999 16:18:07
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00180686
Message ID:
00181053
Views:
15
>>Hi Ed and George!
>>
>>Here is the reason for my request.
>>
>>When using NetFileEnum, you need to provide a server as well as, a base path.
>>
>>In my example, if I want to find out who has \\continuum\putz\recon\recon_check.dbf opened, I would have to call NetFileENum passing "\\continuum" as my server, and "d:\putz\recon\recon_check.dbf" as the base path (this is the physical base path on that server, NOT a mapping).
>>

I just reread this - you could enum all the open files using NetFileEnum() (set the basepath to null; check the second parameter of NetFileEnum() in the MSDN to see the details. Admittedly, it's time consuming, but so is enuming all the shares, and if you're already retrieving FILE_INFO_3 structures, the path is pointed to by the fi3_path member (I'm not certain of this; as I read it, the path should be relative to the basepath parameter provided in the API call.)

-snip-
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
Previous
Reply
Map
View

Click here to load this message in the networking platform