Detect if Network is active or not...

Hi !

I need know (C/C++ source code welcome) if a network are active or not (in
Windows 9x/ME, NT, 2000 and XP)…

Where can I found more informations ?

Thank you

On Fri, 2003-09-19 at 21:19, Marcos Velasco wrote:

I need know (C/C++ source code welcome) if a network are active or not (in
Windows 9x/ME, NT, 2000 and XP)…

That depends on what you mean by ‘active’. If the adapter is set to
DHCP, it may be trying to grab an address, but it won’t be very useful
to you until it gets one. Is that “active”? Also, you may have 3 or 4
NICs in a system. Do you mean by “active” that at least one is usable
or that all are usable?

If you’re doing TCP/IP and are in a default route zone, you’ll probably
find it easiest to wait for a default route to show up in the routing
table. IP helper api can help you there.

-sd

What is your definition for “network is active”? Any adapters started? any
adapters are in media connected state? “connected to the Internet” in terms of
WININET?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Marcos Velasco”
To: “Windows System Software Devs Interest List”
Sent: Saturday, September 20, 2003 6:19 AM
Subject: [ntdev] Detect if Network is active or not…

> Hi !
>
> I need know (C/C++ source code welcome) if a network are active or not (in
> Windows 9x/ME, NT, 2000 and XP)…
>
> Where can I found more informations ?
>
> Thank you
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com