How to use WZCSetInterface API to connect to an access point
Hi,
I am writing an application for WinCE 5.0. I want to connect to different
wireless access point using my application and for this I am using
WZCSetInterface(). Right now what I am doing is that I delelte the preffered
list of networks at the time of start of my application as follows:
DeletePrefferedList()
{
DWORD dwInFlags = 0;
INTF_ENTRY Intf;
memset(&Intf, 0x00, sizeof(INTF_ENTRY));
Intf.wszGuid = adapter_name;
DWORD status = m_WZCSetInterface(NULL, INTF_PREFLIST, &Intf, &dwInFlags);
return status;
}
After this every time I want to connect to an access point, I create a new
list of access points having only one AP to which I want to connect and set
the preffered list of networks then.
Now the problem is that my applicaiton hangs most of the time when I try to
connect to an access point. Could any one please tell me is there any other
way to do so. I also want to tell you that I am loading WZC dll at runtime
and then I am using and then I get addresses of the WZC APIs from it using
GetProcAddress() and then I call those APIs.
Thanks,
Arsalan
|