I'm writing a little app in which people open up text files that get massaged
and then used to update other files.
They us Common File Dialog to navigate to the input files.
I'd like to record which files were chosen, but at the
\\ServerName\ShareName\DirectoryName level.
Seems like the Common File Dialog will always(?) return a path that starts with
a drive letter instead of the full ServerName/ShareName/DirectoryName info.
Anybody know how to resolve a drive letter to ServerName/ShareName? Seems like
something that there's probably an API call for...

Signature
PeteCresswell
Tom van Stiphout - 13 Apr 2006 03:42 GMT
That's not my experience. Of course if someone selects a file on the
say M-drive, that will be returned, but if they select a file using
UNC, then that is what will be returned.
What you wrote is not even possible. Think about it. What if our
network has more than 26 shares. Surely not each one of them can be
represented by a drive letter A-Z.
-Tom.
>I'm writing a little app in which people open up text files that get massaged
>and then used to update other files.
[quoted text clipped - 9 lines]
>Anybody know how to resolve a drive letter to ServerName/ShareName? Seems like
>something that there's probably an API call for...
(PeteCresswell) - 13 Apr 2006 04:17 GMT
Per Tom van Stiphout:
>What you wrote is not even possible. Think about it. What if our
>network has more than 26 shares. Surely not each one of them can be
>represented by a drive letter A-Z.
I think it came out backwards.
The situation is that the user may choose something on drive "M".
Storing drive "M" doesn't do anything for me because anybody could have "M"
pointing to anywhere. Instead I want to store the ServerName/ShareName that the
user currently has their "M" drive pointing to.
Or is there some option in the Common File dialog that makes it return the UNC?

Signature
PeteCresswell
'69 Camaro - 13 Apr 2006 04:54 GMT
Hi, Pete.
> Anybody know how to resolve a drive letter to ServerName/ShareName?
> Seems like
> something that there's probably an API call for...
Correct. You'll find the code for the API functions and the fGetUNCPath( )
function on the following Web page:
http://www.mvps.org/access/api/api0003.htm
You'll just need to parse out the drive letter returned from the Common File
Dialog, pass it to fGetUNCPath( ), and it will return the UNC.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
> I'm writing a little app in which people open up text files that get
> massaged
[quoted text clipped - 13 lines]
> Seems like
> something that there's probably an API call for...