return UNC path

How would we convert a local path to an UNC-path in VB.NET? (without using an API). TIA....
LVL 2
unicorn1824Asked:
Who is Participating?
 
flavoConnect With a Mentor Commented:
YEs i know its api -> http://searchvb.techtarget.com/vsnetATEAnswers/0,293820,sid8_gci954149_tax293674,00.html

I dont belive there is a native way..

Dave
0
 
larryo3Connect With a Mentor Commented:
You can use COM Object: FileSystemObject

In the IDE click Project > Add Reference > COM tab – select Microsoft Scripting Runtime

Code:

Dim FSO As New FileSystemObject
Dim strShare As String

strShare = FSO.GetDrive("J:\").ShareName
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.