Prashant
Prashant

Reputation: 21

GetAdaptersInfo Get Media Status and Detect WiFi Type

I am using code similar to this one: Link

  1. How do I get media status (connected or disconnected)?
  2. How do I know if adapter is wireless type?

Prashant

Upvotes: 2

Views: 1320

Answers (1)

Alex K.
Alex K.

Reputation: 175766

There is the Native WiFi API. (For XP requires SP2/3, min server 2k8)

You can list enabled adapters with WlanEnumInterfaces.

You can fetch state with WlanQueryInterface with wlan_intf_opcode_interface_state to request the state in a WLAN_CONNECTION_ATTRIBUTES struct.

An alternative are the MSNDIS WMI Classes.

Upvotes: 1

Related Questions