Looking for best practice for doing a "Net Use" in C#
Asked Answered
D

1

9

I'd rather not have to resort to calling the command line.
I'm looking for code that can map/disconnect a drive, while also having exception handling.

Any ideas?

Dryasdust answered 12/8, 2008 at 14:53 Comment(1)
any final solution with full source code sample working about it ?Colmar
F
9

Use P/Invoke and WNetAddConnection2
There should also be some wrappers out there to do some of the grunt work for you.
Google is your friend, as always.

Fork answered 12/8, 2008 at 14:58 Comment(1)
any full real sample using wrappers ?Colmar

© 2022 - 2024 — McMap. All rights reserved.