I'm guessing you'd need to access the NetAPI to find out what shares exist
on the computer, and then present a choice. On NT machines, you'll see that
each drive is shared as X$, where X is the drive letter. So, you could
remove the root (X:\) and replace with \\machinename\X$\ .
Thanks for your post. I agree with Mike that you will need to call
unmanaged APIs to get the UNC name of a folder.
In addition, if the folder is already shared explicitly, we are able to
call WNetEnumResource to enumerate the network resources to get its UNC.
You can use P/Invoke in your managed .NET application to call
WNetEnumResource() API to determine to which a specific local name is
mapped to a remote name of a shared folder. I believe the following article
and sample are helpful:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.