What is the equivalent of API WNetAddConnection2 in C#?

G

Guest

Hi,

We know that windows API WNetAddConnection2 can make a connection to a
network resource. but how to do this job in C#? i'm wondering about it.

Thanks
-Zhilin
 
W

Willy Denoyette [MVP]

| Hi,
|
| We know that windows API WNetAddConnection2 can make a connection to a
| network resource. but how to do this job in C#? i'm wondering about it.
|
| Thanks
| -Zhilin

By PInvoking WNetAddConnection2, the framework has no managed equivalent.
Note that there is (almost) no reason to make a connection to a shared
resource, learn to use UNC paths when accessing shared files.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top