|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Getting the physical path of network drive.Hi ,
I am writing a program that part of than program if to add a new network drive to the user. The adding part i know how to do (by win api "WNetAddConnection2A") but i want to check first if this path (network path) exist of his computer, if it does , what is the drive name. to do this i need some how to get the network drive on the local computer by the network path (\\comp1\C$\reports). How do i do that ? some things that i found ... * I think that i need to use "WNetGetResourceInformation" win api function, but i can't find how to use it. Please help, Rony Hi there,
Use NetShareEnum() WinAPI function. Here you will find nice example http://www.pinvoke.net/default.aspx/netapi32/NetShareEnum.html hope this helps -- Show quoteMilosz Skalecki MCP, MCAD "rony_16" wrote: > Hi , > I am writing a program that part of than program if to add a new > network drive to the user. > The adding part i know how to do (by win api "WNetAddConnection2A") but > i want to check first if this path (network path) exist of his > computer, if it does , what is the drive name. > to do this i need some how to get the network drive on the local > computer by the network path (\\comp1\C$\reports). > > How do i do that ? > some things that i found ... > * I think that i need to use "WNetGetResourceInformation" win api > function, but i can't find how to use it. > > Please help, Rony > > |
|||||||||||||||||||||||