Register/map network drive using managed code?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JDeats

    #1

    Register/map network drive using managed code?

    Is it possible to have a .NET Application register a network drive map
    (e.g. Z: \\server1\myfol der)? If so could someone post a code sample?

    -Jeremy
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Register/map network drive using managed code?

    Jeremy,

    You will want to make a call to the WNetAddConnecti on (or
    WNetAddConnecti on2 or WNetAddConnecti on3). You will have to do this through
    the P/Invoke layer, but the call is to the same API you would use in C++.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "JDeats" <jeremy@pdq.net > wrote in message
    news:b0738dc6.0 311171247.7dbd0 cb9@posting.goo gle.com...[color=blue]
    > Is it possible to have a .NET Application register a network drive map
    > (e.g. Z: \\server1\myfol der)? If so could someone post a code sample?
    >
    > -Jeremy[/color]


    Comment

    Working...