Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reading the current network speed

57 views
Skip to first unread message

Florian Baenziger

unread,
Dec 20, 2002, 7:51:57 AM12/20/02
to
Hi there

I need to read the currend set
networkspeed(10half/10full/100half/100full/Autosense) of the local computer.
I tried a lot, but didn't found a way to get the infos i need.
Can someone help me?
Thanx people!!

Regards,
Florian Bänziger


Torgeir Bakken (MVP)

unread,
Dec 20, 2002, 7:32:28 PM12/20/02
to
Florian Baenziger wrote:

> Hi there
>
> I need to read the currend set
> networkspeed(10half/10full/100half/100full/Autosense) of the local computer.
> I tried a lot, but didn't found a way to get the infos i need.
> Can someone help me?

Hi


There is no standard for Duplex setting retrival:

From: Duke Sun (qua...@microsoft.com)
Subject: RE: Network Adapter Duplex Mode
Newsgroups: microsoft.public.win32.programmer.wmi
Date: 2002-09-23 01:22:17 PST

</qoute>
Duplex Mode is not an O/S concept. The Ethernet Half/Full/Auto duplex
settings is handled directly by the device, and specified as a user
configurable adapter parameter in the adapter's INF file. During
installation this is picked up from the INF and stored in the registry.
You'll have to open the device's registry key directly using
SetupDiOpenDevRegKey (documented in MSDN), then read the values under it.

(If you want to look it up in regedit, this translates to the adapter
instance key under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11C
E-BFC1-08002bE10318}\xxxx (never open this key programatically! - use
SetupDi API for this). The list of allowed values is under the "Ndi\params"
subkey under the device key).

However, I doubt whether this will be useful to you at all to try and get
the duplex in any type of generic fashion for all brands of NIC. E.g. for
my 3COM Card, the duplex is stored under the "Media_type" parameter, where
for my Intel Card, it's stored under the "SpeedDuplex" parameter. You
probably find as many parameter names as you have vendors. Of course if
this is for an internal app, and your customer's organization standardized
on one specific vendor, you may be able to get at least some of the way
there.
</qoute>


--
torgeir
Microsoft MVP Scripting and WMI
Porsgrunn Norway


Florian Baenziger

unread,
Dec 24, 2002, 4:06:48 AM12/24/02
to
Hi Torgeir

Thanx a lot for your help.
Wish you a nice christmas eve.

Regards,
Florian Bänziger


0 new messages