I've googled this until my fingers bled and for the life of me I can't seem to find anything. What I basically need to know is how to get the SSID name of the current wireless connection if it exists.

I was able to do this for Windows Mobile platform using DeviceIoControl, but for the life of me I can't seem to find a definitive answer for the win32 api. I just need to be pointed towards the right direction.

My application needs to know it is connecting to the right SSID name for security reasons and I need it to work for windows mobile 5.0 and windows xp.

So far I've found either WMI which requires me to use COM or Windows Native Wifi API, which I need to install a library (which may not be feasible for our deployed windows xp devices). Any help is appreciated =)