Click here to Skip to main content
6,596,602 members and growing! (20,370 online)
Email Password   helpLost your password?
General Programming » Internet / Network » Internet & Network     Intermediate

.NET Wrapper DLL for the WNet API

By Calishar

A simple wrapper DLL containing most of the functions in the WNet API.
C#.NET 1.1, Win2K, WinXP, Win2003VS.NET2003, Dev
Posted:18 Aug 2003
Views:59,975
Bookmarked:21 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
22 votes for this article.
Popularity: 3.04 Rating: 2.26 out of 5
13 votes, 59.1%
1

2

3
5 votes, 22.7%
4
4 votes, 18.2%
5

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


Member

Occupation: Web Developer
Location: Canada Canada

Other popular Internet / Network articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
Generalhow to test these classes Pinmemberbaya39:46 28 May '08  
GeneralThank you Pinmembersbsrazor16:53 23 May '08  
GeneralNice article PinmemberVikas Salvi22:23 24 May '06  
Generalnice, but need WNetGetNetworkInformation PinsussPrincesse6:49 18 Jan '05  
GeneralRe: nice, but need WNetGetNetworkInformation PinmemberPrincesse7:02 18 Jan '05  
GeneralRe: nice, but need WNetGetNetworkInformation PinsussPrincesse5:40 20 Jan '05  
GeneralNice Job PinmemberEric Rinn7:06 21 Dec '03  
GeneralHow do you respond to the Author of these code submissions PinmemberSilverKitty5:52 21 Aug '03  
Generalsuch a hi rating PinmemberNormski21:19 19 Aug '03  
GeneralRe: such a hi rating PineditorNishant S22:34 19 Aug '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 18 Aug 2003
Editor: Smitha Vijayan
Copyright 2003 by Calishar
Everything else Copyright © CodeProject, 1999-2009
Web13 | Advertise on the Code Project