Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unmap drive to unc question

Status
Not open for further replies.

longda

Programmer
Jul 24, 2001
66
US
I read the faq184-3137 about using the WnetGetConnection api call. This is cool and all but I was using the adir function with the "V" flag to return the volume name. If it is a mapped drive it returns the unc path as the volume name. I am not to familar with the difference between volume name and folder name or if they are one in the same. I am questioning this because if you rename your c:\ drive to say "my drive" as the volume name, adir returns "my drive" for that local drive. So will adir return the correct unc path with the volume or folder for a network drive. I guess I am a little confused on the difference between volumes and folders for the network or local drives. Adir seems to working for me now I just don't want it break in the future. Thanks for the help.

Thanks
Dave L.
 
What if you had two computers, both with the volume as "my drive". They would no longer be unique. In MS's world, this ain't good. So I can see why that would return the UNC name.

Also, since the drive label may be local to the local OS rather than a network API call or remote OS, the returned value may not available.

I could be totally wrong too.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top