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