UNC path with / or \

G

Guest

For some 'historical' reasons our software uses WNetAddConnection2(...) with
an UNC path like //Server/Share (normal slash). This works fine with Win98,
WinNT, W2k and WinXP.
With my WinXp embedded (network with domain paticipation is included) you
have to enter the path with backslash \\Server\Share or you get no connection.

Has anyone an idea wich component does the translation from '/' to '\' ???

bcp
 
K

KM

bcp,

Hmm.. Are you sure you could use "//server" UNC paths on XP Pro and/or Win2K?
Perhaps, it is the API (WNetAddConnection2) that allows to use that notation. But I'd be surprise if it does so.

Don't have much time now to spend on this but net.exe tool (which uses the same WNet APIs) doesn't allow you to use // notation on
XP.
 
G

Guest

Sorry Konstantin,
you are right, the WNetAddConnection2 API only accepts "\\SERVER".

The 'normal' computers where I was testing with standard XP /W2K, had some
'stored' network connections that they were remembering when I tried the
"//Server" syntax. In this case WNetAddConnection2 fails, but the software
had network access through the stored connections and copied files over the
network :)

And in Win98 is another path in the software, there is no
WNetAddConnection2, we just do a CopyFile with "//Server/share" as
destination an that really works.

Regards,
Burkhard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top