OpenFileDialog & server names

Does anyone know if (or how) I can use the OpenFileDialog box, but return the path name with the server (\servername\path\filename) rather than the mapped drive letter (x:\path\filename)? Or is there maybe a way to use an API to figure out what a drive letter is mapped to?

Subject: OpenFileDialog & server names

Try the GetLogicalDriveStrings API.

Definition:

Declare Function GetLogicalDriveStrings Lib “kernel32” Alias “GetLogicalDriveStringsA” ( _

ByVal nBufferLength As Long, _

ByVal lpBuffer As String _

) As Long

Usage:

You can determine which drive letters are in use on a local computer by using the GetLogicalDriveStrings Win32 API. This list of drive letters will be the drive letters of all active drives on the local computer, including floppy drives, hard disks, mapped drives, and other drives that are mapped to a drive letter.

The GetLogicalDriveStrings API function returns a string containing a list of all active drive letters on the local computer. The format of the string is a null-separated list of drive letters with a terminating null at the end of the string. For example, a computer with a single floppy drive (A:) and a single hard disk drive (C:) would have a string of the following format returned by GetLogicalDriveStrings: A:<null>C:<null>