How to get local path from a shared folder name?
-
Dear all, I created a subfolder1 under a shared folder1 which was shared to all users exp: \\server1\shared folder1\shared subfolder1\ then i need to shared this subfolder1 to a specific user, so i need the local path of this subfolder1 to implement network share how can i get local path from \\server1\shared folder1?? :( Thanks for your help. Tida
-
Dear all, I created a subfolder1 under a shared folder1 which was shared to all users exp: \\server1\shared folder1\shared subfolder1\ then i need to shared this subfolder1 to a specific user, so i need the local path of this subfolder1 to implement network share how can i get local path from \\server1\shared folder1?? :( Thanks for your help. Tida
You can use NetShareGetInfo If you're running on Windows NT/2K/XP you can use level 2 and a structure of type SHARE_INFO_2; on Windows 9x/ME level 50 and pass in a structure of type share_info_50. The two structures unfortunately are defined in two different header files and, if you're targeting win9x you'll also need to link to a different library (netapi32.lib for NT/2K/XP and svrapi.lib for 9x) Hope that helps, Alberto