I neet to get UNC path from mapped drive. I tried to use WNetGetConnection, but it doesn't work for me. It returns error 487. Does anybody know how to deal with this error or any other way to get the UNC path?
相关问题
- 'System.Threading.ThreadAbortException' in
- how to use special characters like '<'
- C# to VB - How do I convert this anonymous method
- Scaling image for printing
- visual basics equal to or greater than
相关文章
- vb.net 关于xps文件操作问题
- Checking for DBNull throws a StrongTypingException
- Using the typical get set properties in C#… with p
- Load a .NET assembly from the application's re
- C# equivalent of VB DLL function declaration (Inte
- What other neat tricks does the SpecialNameAttribu
- Is there a way to modify the entity mapping config
- Automatically install updates with ClickOnce deplo
Works good for me and simpler than an api call like on http://vbnet.mvps.org/index.html?code/network/uncfrommappeddrive.htm The only thing is I had to add a line of code to Dim the variable Line.
Thanks for the help
Totally go with @Alex K's P/Invoke suggestion, I just wanted to post a hack method of piping through the
net use
command:You can use the
WNetGetUniversalName
API.