Click here to Skip to main content
Licence 
First Posted 18 Aug 2003
Views 74,689
Bookmarked 23 times

.NET Wrapper DLL for the WNet API

By | 18 Aug 2003 | Article
A simple wrapper DLL containing most of the functions in the WNet API.

Introduction

This is a simple wrapper DLL to allow easier access to the WNet API from within the .NET environment.

The WNet API can be used to add/delete network connections (drive and printer mappings) as well as enumerate all devices and shares on the network (see MSDN for the full documentation).

Out of a total of 23 functions and seven structures, 17 functions and all structures are included in this version of the DLL.

The download contains source code for the DLL, which has XML documentation included. There is also a (very) simple sample application in order to demonstrate how to call the functions.

At the moment, the following functions still have not been wrapped.

  • WNetGetNetworkInformation
  • WNetGetProviderName
  • WNetGetResourceInformation
  • WNetGetReourceParent
  • WNetGetUniversalName
  • WNetRestoreConnectionW

Any feedback would be appreciated.

Email (make obvious replacements): nlinnett *at* integranetworks *dot* com.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Calishar

Web Developer

Canada Canada

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Questionhow to test these classes Pinmemberbaya38:46 28 May '08  
GeneralThank you Pinmembersbsrazor15:53 23 May '08  
GeneralNice article PinmemberVikas Salvi21:23 24 May '06  
Generalnice, but need WNetGetNetworkInformation PinsussPrincesse5:49 18 Jan '05  
GeneralRe: nice, but need WNetGetNetworkInformation PinmemberPrincesse6:02 18 Jan '05  

Sorry... D'Oh! | :doh:
 
I meant the WNetGetConnection rather than WNetGetNetworkInformation...
GeneralRe: nice, but need WNetGetNetworkInformation PinsussPrincesse4:40 20 Jan '05  
GeneralNice Job PinmemberEric Rinn6:06 21 Dec '03  
QuestionHow do you respond to the Author of these code submissions PinmemberSilverKitty4:52 21 Aug '03  
Generalsuch a hi rating PinmemberNormski20:19 19 Aug '03  
GeneralRe: such a hi rating PineditorNishant S21:34 19 Aug '03  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120528.1 | Last Updated 19 Aug 2003
Article Copyright 2003 by Calishar
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid