Click to See Complete Forum and Search --> : How to get network path from local path?


Mark Veldt
May 18th, 1999, 06:18 AM
Is it possible to convert from a shared directory (D:\data\MyShare) or mapped driveletter (lets say 'N:\') to the networkname (\\Client\MyShare\)?
I know that the mapped drive is mapped with GetDriveType, but i must give the networkname (that is know by the server) to the server.

An other problem (less important) is how to get from \\Client\disk1\test\ to D:\data\test\ ?
(when are physical on this client)

If anybody knows how to solve these problems (realy need the first one) i'm a happy person and can sleep a bit better :-)

Mark

Lothar Haensler
May 18th, 1999, 06:52 AM
check out WNetGetConnection

Mark Veldt
May 18th, 1999, 11:11 AM
Thanks Lothar,

but this only works for mapped drives.
Can i get the locally shared directory in any way?

Like i shared a directory on my disk (say: C:\Data\ForAll\ shared as Mark), how can i detect if this directory is shared to the public?
(convert to \\Client\Mark\)

Mark

Lothar Haensler
May 19th, 1999, 02:11 AM
I haven't tried it, but the description for NetShareCheck looks like it could give an answer to your question.

Will Rothwell
May 19th, 1999, 02:43 AM
I am about to jump into the same pool of 'trouble' water as you are. Check out the WNetxxxxxx series of function calls. I have not tried yet but they look promissing.

Another place to look at is QueryDosDevice(..).

Do let me know how you get on.

Will