title: How to connect to a Wifi that requests for a network security key using Windows Native Wifi Functions?
body: <p>I'm developing a way to connect to a Wifi using VS2010 and currently stuck on how to make it connect with a network security key. I am able to enumerate all the Wifi hotspot in my area and get their SSID, MAC addresses, etc using Windows Native Wifi Functions (WlanOpenHandle, WlanEnumInterfaces, WlanQueryInterface, WlanGetNetworkBssList). I've already read about <code>WlanConnect()</code> on MSDN but I'm still clueless. Can you give me some hints that would make the code connect to a Wifi that asks for a network security key?</p>