Solved

NIC information

Posted on 2002-05-18
5
241 Views
Last Modified: 2010-04-04
Hello everyone,

How do I retrieve the following information from a workstation running Windows NT 4 (or better) or Windows 9.X (or better):

1) Type: ethernet or Token Ring?
2) Duplex: full or half?
3) Speed: 10/100 or 4/16?
4) Make/model/chip revision?

Any tips/hints/code samples are very much appreciated
Thanks
Vladimir
0
Comment
Question by:vladh
5 Comments
 
LVL 9

Expert Comment

by:ginsonic
ID: 7019293
listening
0
 
LVL 2

Expert Comment

by:freshman3k
ID: 7020190
Hello,

These may help,

http://www.jazarsoft.com/vcl/view.php3?id=16
http://www.mitec.d2.cz

I also know that this part of the registry,
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Net

holds information on network card installed. Have a look with RegEdit , you might have to iterate a few branches in that key to find the info you need.

These links may help, but in VB

http://www.mvps.org/vbnet/index.html?code/wmi/wminetworkadapterconfig.htm
http://www.mvps.org/vbnet/index.html?code/wmi/wminetworkadapter.htm
0
 
LVL 2

Accepted Solution

by:
freshman3k earned 500 total points
ID: 7020193
P.S

Here is some code in Delphi,
http://community.borland.com/article/0,1410,26040,00.html

You can use the info from the VB site , and itegrate it with info from the Community site.
0
 
LVL 3

Author Comment

by:vladh
ID: 7044545
freshman,

Thanks for the tips and links. Registry information is not very accurate for several reasons:
1) on Windows 2000, it will retain information of all NICs ever installed (and maybe later removed) from the machine. If a NIC is physically removed from the box but the drivers are not, then the info will still stay in the registry.
2) Registry info will show the configuration settings, NOT the current running configuration. I.e. I can configure a NIC to Auto-Configure its speed (100/10) but the actual current speed is NOT saved in the registry. This is something I have to query the card to find out. In W2K, you have an indicator for each connection icon, telling you at what speed the NIC is running at the moment. This is the info I need.

Also, there are numerous examples out there telling you how to obtain a MAC address or IP address of a NIC. Most of these examples are too simplistic and are designed to work in an idealistically simple environment. Most MAC adress retrieval examples use NetBEUI to get the address, assuming the protocol is loaded on a machine and fail miserably when it is not. Most examples that retrieve IP address grab the first address they can find and declare victory - well, if I have 2 NICs in my machine (and sometimes more), I am out of luck because I can not control which NIC it goes after.

Generally speaking, all the examples I have seen so far are too high level, rely on a particular protocol (by assuming it is loaded and bound) and just do not provide the information I need. I beleive I need to query the actual NIC for the information and I should be able to list currently installed NICs and choose the one I am interested in.

Thanks
Vlad
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9005991
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from freshman3k

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now