title: API to get WiFi channel in Widows 8/10
body: <p>I'm looking for a WinAPI function to extract the WiFi channel of the current AP that my computer is connected to, such as the channel noted in the output below (11). I can do it via 'netsh' command line, and I can obviously write a program that executes this command and parses the output, but I was hoping to find a cleaner, more direct way.</p>
  
  <pre><code>C:\Users\&gt;netsh wlan show interfaces
  There is 1 interface on the system:
  Name                   : Wireless Network Connection
  Description            : Intel(R) Centrino(R) Advanced-N 6200 AGN
  GUID                   : 
  Physical address       : 
  State                  : connected
  SSID                   : 
  BSSID                  : 
  Network type           : Infrastructure
  Radio type             : 802.11g
  Authentication         : 
  Cipher                 : 
  Connection mode        : 
  ***Channel***          : 11
  Receive rate (Mbps)    : 54
  Transmit rate (Mbps)   : 54
  Signal                 : 99%
  Profile                : 
  Hosted network status  : Not started
  </code></pre>
  
  <p>Programming language is C/C++.</p>