I'm adding the ability within an app to create a wifi hosted network. I finally got the example app working from the Windows 7 sdk.
What I am not finding is a built in way to get the IP address of the wifi device used to create the hosted network. I need that address to bind a server to it.
The only way I can think of doing this is maybe using the MAC address of the device and matching that to an entry in a list of all network devices on the machine? Is that the only way? Would that even work since the wifi hosted device is virtual (according to the documentation)?
There looks like a way (WlanHostedNetworkQueryStatus) to get the MAC address and GUID of the wlan device used but the best way to turn that into an actual IP address eludes me...
I'm pretty new to C++ and Windows development so maybe it's something simple I'm missing.
I ended up using the IP Helper API to convert the WLAN GUID to LUID and then LUID to Index. The included header files were a bit annoying to figure out since most documentation seems to be geared for device drivers. The ones I needed were.
This is member is the GUID of a virtual wireless device which would not be available through calls to the WlanEnumInterfaces function. This GUID can be used for calling other higher layer networking functions that use the device GUID (IP Helper functions, for example).