by Gehan Fernando (47 Submissions)
Category: Windows System Services
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Wed 24th September 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get Full Network Card Informations
API Declarations
.Net
.Net.WebClient
.Management
Private Sub FrmNetSpeed_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim M As ManagementClass = New ManagementClass("Win32_NetworkAdapter")
For Each X As ManagementObject In M.GetInstances()
Dim AdapterType As String = X.Properties.Item("AdapterType").Value
Dim AdapterTypeID As UInt16 = X.Properties.Item("AdapterTypeID").Value
Dim AutoSense As Boolean = X.Properties.Item("AutoSense").Value
Dim Availability As UInt16 = X.Properties.Item("Availability").Value
Dim Caption As String = X.Properties.Item("Caption").Value
Dim ConfigManagerErrorCode As UInt32 = X.Properties.Item("ConfigManagerErrorCode").Value
Dim ConfigManagerUserConfig As Boolean = X.Properties.Item("ConfigManagerUserConfig").Value
Dim CreationClassName As String = X.Properties.Item("CreationClassName").Value
Dim Description As String = X.Properties.Item("Description").Value
Dim DeviceID As String = X.Properties.Item("DeviceID").Value
Dim ErrorCleared As Boolean = X.Properties.Item("ErrorCleared").Value
Dim ErrorDescription As String = X.Properties.Item("ErrorDescription").Value
Dim GUID As String = X.Properties.Item("GUID").Value
Dim Index As UInt32 = X.Properties.Item("Index").Value
Dim InstallDate As DateTime = X.Properties.Item("InstallDate").Value
Dim Installed As Boolean = X.Properties.Item("Installed").Value
Dim InterfaceIndex As UInt32 = X.Properties.Item("InterfaceIndex").Value
Dim LastErrorCode As UInt32 = X.Properties.Item("LastErrorCode").Value
Dim MACAddress As String = X.Properties.Item("MACAddress").Value
Dim Manufacturer As String = X.Properties.Item("Manufacturer").Value
Dim MaxNumberControlled As UInt32 = X.Properties.Item("MaxNumberControlled").Value
Dim MaxSpeed As UInt64 = X.Properties.Item("MaxSpeed").Value
Dim Name As String = X.Properties.Item("Name").Value
Dim NetConnectionID As String = X.Properties.Item("NetConnectionID").Value
Dim NetConnectionStatus As UInt16 = X.Properties.Item("NetConnectionStatus").Value
Dim NetEnabled As Boolean = X.Properties.Item("NetEnabled").Value
Dim PermanentAddress As String = X.Properties.Item("PermanentAddress").Value
Dim PhysicalAdapter As Boolean = X.Properties.Item("PhysicalAdapter").Value
Dim PNPDeviceID As String = X.Properties.Item("PNPDeviceID").Value
Dim PowerManagementSupported As Boolean = X.Properties.Item("PowerManagementSupported").Value
Dim ProductName As String = X.Properties.Item("ProductName").Value
Dim ServiceName As String = X.Properties.Item("ServiceName").Value
Dim Speed As UInt64 = X.Properties.Item("Speed").Value
Dim Status As String = X.Properties.Item("Status").Value
Dim StatusInfo As UInt16 = X.Properties.Item("StatusInfo").Value
Dim SystemCreationClassName As String = X.Properties.Item("SystemCreationClassName").Value
Dim SystemName As String = X.Properties.Item("SystemName").Value
Dim TimeOfLastReset As DateTime = Convert.ToDateTime(X.Properties.Item("TimeOfLastReset").Value)
Next
End Sub
End Class