2

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
Prashant
  • 21
  • 2

1 Answers1

1

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.

Alex K.
  • 171,639
  • 30
  • 264
  • 288