5,442,984 members and growing! (18,526 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#Windows, .NET, .NET 1.1, Win2K, WinXP, Win2003VS.NET2003, Visual Studio, Dev

Posted: 18 Aug 2003
Updated: 18 Aug 2003
Views: 50,790
Bookmarked: 15 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
21 votes for this Article.
Popularity: 2.93 Rating: 2.22 out of 5
13 votes, 61.9%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
4 votes, 19.0%
4
4 votes, 19.0%
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



Occupation: Web Developer
Location: Canada Canada

Other popular Internet / Network articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
Subject  Author Date 
Generalhow to test these classesmemberbaya39:46 28 May '08  
GeneralThank youmembersbsrazor16:53 23 May '08  
GeneralNice articlememberVikas Salvi22:23 24 May '06  
Generalnice, but need WNetGetNetworkInformationsussPrincesse6:49 18 Jan '05  
GeneralRe: nice, but need WNetGetNetworkInformationmemberPrincesse7:02 18 Jan '05  
GeneralRe: nice, but need WNetGetNetworkInformationsussPrincesse5:40 20 Jan '05  
GeneralNice JobmemberEric Rinn7:06 21 Dec '03  
GeneralHow do you respond to the Author of these code submissionsmemberSilverKitty5:52 21 Aug '03  
Generalsuch a hi ratingmemberNormski21:19 19 Aug '03  
GeneralRe: such a hi ratingeditorNishant 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-2008
Web10 | Advertise on the Code Project