Drive Mapping

  • Thread starter Thread starter Chris Fink
  • Start date Start date
C

Chris Fink

Hi,

Attempting to determine if a drive mapping is present, and if it is not,
want to connect it. Anyone familiar with the .net classes that I would use
to accomplish this?

Thanks in advance.

Sample code is appreciated.
 
This is an article covering your problem, with source code and examples:
http://www.codeproject.com/dotnet/pinvokeaddshare.asp
Title of this article says how to create a file share using .NET framework.
But if you really get down to bottom of it, there is no class or method in
..NET framework that accomplishes this task. This is the time when we take
help from PInvoke to call unmanaged Win32 API. The NetApi in Win32 platform
provides a rich set of functions that allows us to do network management.
 
Jan,

No, this the time you take a look at the System.Management classes :-).

Willy.
 
Hi Willy

Do you have a small code snippet how you can do this? Because I'm not aware
how this can be done using the System.Management namespace. I agree it would
be (a lot) nicer than using PInvoke. Thx!

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
Back
Top