In my FireBreath plugin I am trying to determine Wifi SSID and/or scan for visible Wifi access points.
In the Windows portion of the code this entails starting with the following:
dwResult = WlanOpenHandle(dwMaxClient, NULL, &dwCurVersion, &hClient);
Unfortunately, dwResult
is always returning: 1062, which translates to "The service has not been started" (via FormatMessage()
).
I have tried running in the main thread as well as in a boost thread started as follows:
boost::thread t(boost::bind(&LaasTechAPI::doSomethingTimeConsuming_thread, this, num, callback));
The error 1062 is the same regardless.
(Incidentally, I implemented the thread methodology because a. Internet search indicates some sort of an ATL/MTL 'apartment' threading issue and b. Wifi scan is known to be an inherently slow asynchronous endeavor, so threading seemed necessary all along)
Can anyone tell me how to solve this WlanOpenHandle error 1062 issue?
Secondary:
Thank you!
This will solve Windows Error 1062: "The service has not been started".
I think you should look more closely at @Georg's comment and verify that WZC is started. Here is the relevant text from the remarks section at his link: http://msdn.microsoft.com/en-us/library/windows/desktop/ms706759(v=vs.85).aspx
WlanOpenHandle will return an error message if the Wireless Zero Configuration (WZC) service has not been started or if the WZC service is not responsive.
Enable the services in a Windows Command Prompt (DOS):
> net start wzcsvc
Or, type:
> sc config wzcsvc start= <boot|system|auto|demand|disabled|delayed-auto>
Help message:
> sc config /?
Or, open the Services app:
> services.msc