Managing network adapters

Posted: 08-19-2003, 05:17 PM
In my system I will have a built-in 10/100 network adapter, and an optional
wireless adapter. Only one connection will be used. When both adapters are
fitted, I want to set allow the user to set a static IP on one and disable
the other. When the system starts it should use the last setting that it
had.

I need to detect when both are fitted (which I think I can do with the
GetAdaptersInfo API call). Can anyone confirm that this lists adapters
whether or not they are disabled?

I can set the static addresses either using IPChange.exe with the name
supplied by GetAdaptersInfo, or with IP helper APIs.

The missing link is how do I programmatically enable and disable adapters,
and find their state. There is a state in structure returned by
GetInterfaceInfo, but this does not seem to do what I want. If I disable an
adapter from the desktop, GetInterfaceInfo does not see it at all - let
alone give the facility to re-enable it. What I really want is the APIs to
get and set the adapter state that are used in the properties of the the
network connection on the desktop. Any one know how?

TIA

Simon


Reply With Quote

Responses to "Managing network adapters"

Slobodan Brcin
Guest
Posts: n/a
 
Re: Managing network adapters
Posted: 08-19-2003, 06:13 PM
Hi Simon,

Try posting this question in microsoft.public.win32.programmer.networks

Best regards,
Slobodan

"Simon Wilton" <simon.wilton@ability-it.com> wrote in message
news:#b0lV4mZDHA.2520@TK2MSFTNGP09.phx.gbl...
> In my system I will have a built-in 10/100 network adapter, and an
optional
> wireless adapter. Only one connection will be used. When both adapters are
> fitted, I want to set allow the user to set a static IP on one and disable
> the other. When the system starts it should use the last setting that it
> had.
>
> I need to detect when both are fitted (which I think I can do with the
> GetAdaptersInfo API call). Can anyone confirm that this lists adapters
> whether or not they are disabled?
>
> I can set the static addresses either using IPChange.exe with the name
> supplied by GetAdaptersInfo, or with IP helper APIs.
>
> The missing link is how do I programmatically enable and disable adapters,
> and find their state. There is a state in structure returned by
> GetInterfaceInfo, but this does not seem to do what I want. If I disable
an
> adapter from the desktop, GetInterfaceInfo does not see it at all - let
> alone give the facility to re-enable it. What I really want is the APIs to
> get and set the adapter state that are used in the properties of the the
> network connection on the desktop. Any one know how?
>
> TIA
>
> Simon
>
>

Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless Adapters Doug Windows Vista Networking & Sharing 2 10-21-2006 07:22 PM
Any wireless adapters working Nigel Beardsley Windows Vista Networking & Sharing 7 10-12-2006 04:54 AM
Managing locations Erik Cominolli Windows XP Work Remotely 1 07-29-2003 02:44 AM
Managing an NT server from an XP workstation Becky Windows XP Work Remotely 1 07-15-2003 02:41 AM
Can't find my Display Adapters Tab!! Kelly Windows XP 1 07-09-2003 03:32 PM


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90