Returning UNC from OpenFileDialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way for the OpenFileDialog to return the UNC equivalent of the
path of a file the user selects or is there another way to discover the UNC
equivalent of the path?
 
WhiskyRomeo said:
Is there a way for the OpenFileDialog to return the UNC equivalent of the
path of a file the user selects or is there another way to discover the
UNC
equivalent of the path?

Notice that there is not necessarily a one-to-one mapping between local
paths and UNC paths, because there can be multiple shares. You can use
p/invoke on 'WNetEnumResource' to get a list of shares on the server.

<URL:http://groups.google.de/groups?threadm=u7G9U0KzCHA.1768@TK2MSFTNGP12>
 
Thanks for the help.

It is too bad this is not handle by .NET because it is such a common need
and it should be as simple as setting properties in OpenFileDialog like

OpenFileDialog.ShowPath = "Normal" 'Normal path is shown to user
OpenFileDialog.ReturnUNCPath = True 'UNC path is the value returned

oh well, again thanks for the response.

Bill
 
Back
Top