🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Wmi DefaultIPGateway returning error

#13982
From: Hugo Oliveira Dias
Date: Mon, 01 Sep 2003 16:10
20 lines
1755 bytes
What OS are you using ? I think that behavior is normal with XP.
Use a try catch statement to handle the error.

"Maurice Anderson" <mauriceanderson@hotmail.com> wrote in message
news:3f3fe1e7$1@newsgroups.borland.com...
> 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: <3f536f30$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f3fe1e7$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d991e75644998da
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-01 09:10:17 PST
From: "Hugo Oliveira Dias" <hugo.dias@no-spam.pluricanal.net>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f3fe1e7$1@newsgroups.borland.com>
Subject: Re: Wmi DefaultIPGateway returning error
Date: Mon, 1 Sep 2003 17:10:36 +0100
Lines: 22
Organization: Synchron Systems
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: 213.58.167.9
Message-ID: <3f536f30$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062432560 213.58.167.9 (1 Sep 2003 09:09:20 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail