🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14972

Re: How to get NIC MAC address under Windows 2000/XP

#14972
From: Vladimir Afanasyev
Date: Thu, 24 Jul 2003 08:52
38 lines
2118 bytes
Hi,
I am not sure (do not try) but

"Maurice Anderson" <mauriceanderson@hotmail.com> wrote:
>On that note, do you know how to programatically:
>
>1.)  Detect if the NIC cable is disconnected?

the property NetConnectionStatus for Win32_NetworkAdapter 
WMI class (WinXP only) can be:
0 - Disconnected
1 - Connecting
2 - Connected
3 - Disconnecting
4 - Hardware not present
5 - Hardware disabled
6 - Hardware malfunction
7 - Media disconnedted
8 - Authenticating
9 - Authentication succeeded
10 - Authentication failed

>2.)  Shut of/disable the NIC?
May be it is possible via Configuration 
Manager (and setupapi). At least you can do 
it manually via Device Manager applet. 

I am worked a little about it but I did not solve 
task of changing (enabl./disab. also) configuration.
It was not my task then.
But I am sure it is possible.

See follow for beginning:
Hardware configuration in Windows
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=20338

Vladimir.
Technical Details
Message-ID: <3f1f9e3b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f1f57a9$1@newsgroups.borland.com> <3f1f874d$1@newsgroups.borland.com> <3f1f9226@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,34a00c071ed95cd8
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-24 02:10:09 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: How to get NIC MAC address under Windows 2000/XP
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 212.82.216.226 212.82.216.226    
X-Forwarded-For: 192.168.0.147
References:  <3f1f57a9$1@newsgroups.borland.com> <3f1f874d$1@newsgroups.borland.com> <3f1f9226@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f1f9e3b$1@newsgroups.borland.com>
Date: 24 Jul 2003 01:52:11 -0700
X-Trace: newsgroups.borland.com 1059036731 207.105.83.65 (24 Jul 2003 01:52:11 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail