Networking Forums

Networking Forums > Wireless Networking > Wireless Networks > Some help on WPS for SP2

Reply
Thread Tools Display Modes

Some help on WPS for SP2

 
 
mav
Guest
Posts: n/a

 
      02-27-2007, 11:50 AM
Hi all,
I'm curently working on IProvisioningProfileWireless::CreateProfile in Cpp,
to add a favorit profile in the wireless zero config.
As far away i check, my xml profile look ok, but when i try to create the
profile, have got an Error code 35
WZC_PROFILE_API_ERROR_XML_VALIDATION_FAILED.

Here the code i used, may someone can help me to find the origin of my
problems (the xxxx in the network are just here to protect the real key, in
my code, the key is ok ).


IProvisioningProfileWireless *pPPW = NULL ;

hrStatus = CoCreateInstance ( CLSID_NetProvisioning, NULL,
CLSCTX_INPROC_SERVER, IID_IProvisioningProfileWireless,( PVOID
* ) &pPPW );

CString xmlProfile = "<?xml version=\"1.0\" ?>"
"<wp:WirelessProfile xmlns=\"
http://www.microsoft.com/provisioning/WirelessProfile\""
" xmlns:wp=\"
http://www.microsoft.com/provisioning/WirelessProfile\">"
"<wp:version>1</wp:version>"
"<wp:ssid>test</wp:ssid>"
"<wp:connectionType>ESS</wp:connectionType>"
"<wp:authentication>Open</wp:authentication>"
"<wp:encryption>WEP</wp:encryption>"
"<wp:networkKey>7B10620880056119B27347XXXX</wp:networkKey>"
// Bad key for the example
"<wp:keyIndex>1</wp:keyIndex>"
"<wp:keyProvidedAutomatically>False</wp:keyProvidedAutomatically>"
"<wp:IEEE802.1XEnabled>False</wp:IEEE802.1XEnabled>"
"</wp:WirelessProfile>";

ULONG wpsResult = 0 ;

hrStatus = pPPW->CreateProfile (
( BSTR ) xmlProfile.AllocSysString(),
( BSTR ) NULL,
//( LPGUID ) &pGuids,
( LPGUID ) &guid,
( PULONG ) &wpsResult
) ;

thanks for all.
Regards
Ps: Excuse the poor english of a french guy


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11