Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Translate a network-mapped drive path to a UNC path

9 views
Skip to first unread message

R.Y.

unread,
Nov 7, 2006, 9:57:01 PM11/7/06
to
Hello guys:

I'm trying to find a way to translate a network-mapped drive path to a
UNC path. For example: W:\test.txt => \\Server\Share\test.txt

Any Win32 API to do this? Thanks in advance.

R.Y.

David Lowndes

unread,
Nov 8, 2006, 5:41:11 AM11/8/06
to
>I'm trying to find a way to translate a network-mapped drive path to a
>UNC path. For example: W:\test.txt => \\Server\Share\test.txt
>
>Any Win32 API to do this? Thanks in advance.

Have a look at WNetGetUniversalName.

Dave

R.Y.

unread,
Nov 8, 2006, 6:25:59 PM11/8/06
to
Cool! Thanks mate.

R.Y.

unread,
Nov 10, 2006, 5:41:36 AM11/10/06
to
Sometimes I can call WNetGetUniversalName. But sometimes it just
returns ERROR_NOT_CONNECTED. All tests are done in a VMWare XP SP2 with
a mapped network drive from VMWare Shared Folders. Anyone has more
experience or suggestion about this topic?

David Lowndes

unread,
Nov 10, 2006, 6:52:51 AM11/10/06
to
>Sometimes I can call WNetGetUniversalName. But sometimes it just
>returns ERROR_NOT_CONNECTED.

:(

Any clue what "sometimes" give rise to the failure?

Is it reliable if you eliminate the VMWare shared folders?

Dave

R.Y.

unread,
Nov 10, 2006, 7:00:15 AM11/10/06
to
I can not see any special things when this failure comes out. At that
time the mapped drive is till accessible and the file can be accessed.

Since the mapped drive is from the VMWare Shared Folders, I can not
remove it.

R.Y.

unread,
Nov 10, 2006, 7:37:15 AM11/10/06
to
Hello David, I tried a new mapped drive from a normal network PC. It
works well.

I'm not sure if this is the problem of VMWare Shared Folders. But I
remember before yesterday I could make the success calls with
WNetGetUniversalName on VMWare-share-folders drives. So weird....

David Lowndes

unread,
Nov 10, 2006, 9:50:40 AM11/10/06
to
>Hello David, I tried a new mapped drive from a normal network PC. It
>works well.

Good. I'd chalk that one up to some flakiness with VMware shared
folders then. I think I've seen other references to quirks using them.

Dave

0 new messages