Link to home
Start Free TrialLog in
Avatar of SSAFECS
SSAFECS

asked on

Is there an easy way in csharp to take a UNC path and resolve its local path

In c#, is there an easy way to take a UNC and resolve its physical location, in other words I have the UNC path \\server\dir1\dir2 and I want to know that that UNC points to C:\dir1\dir2 returned?

I know in c++ there are certain libraries like this one (http://support.microsoft.com/kb/q148391/) that allow for that but I wanted to know if there was an easy way to do it in c#

thanx
ASKER CERTIFIED SOLUTION
Avatar of lucius_the
lucius_the
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SSAFECS
SSAFECS

ASKER

Yea i wound up enumerating the share's via P/Invoke and doing a comparison i just wanted to make sure there wasn't a faster way
Well, maybe there still is a better way... you and I just don't know of it :)
I think this is good, anyway, it sounds like a correct way to go about this problem. Thanks for the points