Visual Basic.NET
  Home arrow Visual Basic.NET arrow Digging into Network Adapters with Visual ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Digging into Network Adapters with Visual Basic.NET and VBScript using WMI
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2006-04-17

    Table of Contents:
  • Digging into Network Adapters with Visual Basic.NET and VBScript using WMI
  • Listing network adapter information using WMI
  • Listing extended information about network adapters using WMI
  • Listing network connection information using WMI

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Digging into Network Adapters with Visual Basic.NET and VBScript using WMI


    (Page 1 of 4 )

    This article explains how you can retrieve network adapter information using both Visual Basic.NET and VB Script together with WMI.
    A downloadable file for this article is available here.

    The sample downloadable solution (zip) is entirely developed using Visual Studio.NET 2003 Enterprise Architect on Windows Server 2003 Standard Edition.  But I am confident that it would work with other versions of Windows (which support .NET 1.1) as well.  To work with Visual Studio 2005, the coding may need minor modifications (I didn't really test it yet).  If you come across any problems, please do post them in the discussion, so that I can guide you accordingly.

    If you wanted to use WMI with JavaScript (on the client side using IE), you may need to regularly check www.devarticles.com for a contribution dealing with this topic.

    Some global routines used for my WMI development

    I already contributed several articles on WMI with Visual Basic.NET and VB Script. I'm trying to cover almost all of the latest aspects of WMI.  I strongly suggest you go through my series on "WMI Programming with Visual Basic.NET" before reading this article.  The series even covers "event handling" using WMI with Visual Basic .NET in the form of a Windows service.

    For flexibility in retrieving WMI information (using VB.NET), I frequently used the following simple global routines which help me to work with other areas of development very easily.

    Public Sub addRow(ByRef dt As DataTable, ByVal p As String, ByVal v As String)
            Dim dr As DataRow
            dr = dt.NewRow
            dr("Property") = p
            dr("Value") = v
            dt.Rows.Add(dr)
        End Sub
    Public Function getStructure() As DataTable
            Dim dt As New DataTable
            dt.Columns.Add(New DataColumn("Property"))
            dt.Columns.Add(New DataColumn("Value"))
            Return dt
        End Function

    Two of my global routines are the above ones, "getStructure" and "addRow."  Both are generally used if I have a "Property->value" scenario. "GetStructure" just creates a data table structure and "AddRow" simply adds a data row for every data table passed to it. 

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys. Another contribution on WMI with Visual Basic.NET and VBScript. Now I...
     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek