Article View: borland.public.cppbuilder.nativeapi
Article #14346Wmi DefaultIPGateway returning error
From: Maurice Anderson
Date: Sun, 17 Aug 2003 20:16
Date: Sun, 17 Aug 2003 20:16
13 lines
1484 bytes
1484 bytes
Are you able to get properties from a Network card using WMI only when a
card is activated/plugged in?
When I execute this code with the NIC cable plugged into the HUB it works
just fine. When I unhook the cable from the NIC it returns a "Variant is
not an Array" error. Also I get a 0 when I do a ArrayDimCount() on
IPAddress. Any ideas would be greatly appreciated.
..
..
VARIANT NetAdapter;
Variant IPAddress=
(Variant(NetAdapter.pdispVal)).Exec(PropertyGet("DefaultIPGateway"));
Technical Details
Message-ID:
<3f3fe1e7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d991e75644998da,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-17 13:40:19 PST From: "Maurice Anderson" <mauriceanderson@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Wmi DefaultIPGateway returning error Date: Sun, 17 Aug 2003 13:16:26 -0700 Lines: 15 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 66.214.28.14 Message-ID: <3f3fe1e7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061151207 66.214.28.14 (17 Aug 2003 13:13:27 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail