WlanSetProfile() Can''t Work in XP sp2.

Hello! All:

My project need to use this function to set wireless NIC config in XP sp2 and Vista.

It works in Vista, however, there is an error when I perform the function directly in XP SP2.

But it works fine if I use trace method (VC2005) in XP SP2.

Could someone tell me why the behavior is different from these two mode.

I don't know the result what's happened between two running mode.

Please give me a hand to solve this strange problem, if you even get same experience.

Thank for your help.

The error message id is following for your reference:

#define ERROR_SERVICE_NOT_ACTIVE 1062L

[665 byte] By [poca] at [2008-3-7]
# 1
Hi,

make sure that the WZCSVC is started. C:\windows\system32\net.exe start WZCSVC.
If Wireless Zero Configuration service is not started the API's wont' either.

Nossnomis at 2007-10-3 > top of Msdn Tech,Windows Networking Development,Windows XP Wireless SDK...