>>Ed,
>>
>>AFAIK, even if you're attached to a particular server, using UNC's doesn't use a device. The DBF() function simply returns \\SERVER\VOLUME\PATH\TABLE.DBF.
>
>That's correct, unless you've mapped a drive, there's no drive letter.
Even with a drive mapped to the server DBF() will return \\SERVER\VOLUME...At least it did when I tested it.
>What he wants to do is get the name of the file on the server in the drive letter/path notation at the server. I know what to do on the server (NetShareEnum() with a level of 2, returning a SHARE_INFO_2 structure, which contains a pointer to the local path in the shi2_path member), but it can only be done from an account with admin or server operator group membership. It's a fair amount of code to implement; my guess is that buying it off the shelf in something like NETLIB will be cheaper than writing and debugging it.
If he knows that the first two parts are the server and volume, he could user WNetGetConnection() and compare what the \\SERVER\VOLUMES are. I don't maybe I'm missing something here.
George
Ubi caritas et amor, deus ibi est