PeerIdentityImport (Windows CE 5.0)
This function imports one peer identity. If the peer identity exists on a computer, PEER_E_ALREADY_EXISTS is returned.
HRESULT WINAPI PeerIdentityImport( PCWSTR* ppwzImportXML, PCWSTR pwzPassword, PCWSTR* ppwzIdentity);
Parameters
- ppwzImportXML
[out] Pointer to the XML format peer identity to import. This is returned by PeerIdentityExport. This binary data must match the exported data exactly. The XML must remain valid XML with no extra characters. - pwzPassword
[in] Specifies the password to use to de-crypt a peer identity. The password must be identical to the password supplied to PeerIdentityExport. This parameter cannot be NULL. - ppwzIdentity
[out] Pointer to a string that represents a peer identity that is imported. If the import operation is successful, the application must free ppwzIdentity by calling PeerFreeData.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
S_OK | Function call succeeded. |
E_INVALIDARG | One of the parameters is not valid. |
E_OUTOFMEMORY | There is not enough memory to perform the specified operation. |
PEER_E_NO_KEY_ACCESS | Access to the peer identity or peer-to-peer group keys was denied. This is typically caused by an incorrect access control list (ACL) for the folder that contains the user or computer keys. This can happen when the ACL has been manually reset. |
PEER_E_NOT_FOUND | A peer identity that matches the specified name cannot be found. |
Remarks
The following XML fragment is used by PeerIdentityImport:
<PEERIDENTITYEXPORT VERSION="1.0">
<IDENTITY>
<!-- UTF-8 encoded peer name of the identity -->
</IDENTITY>
<IDENTITYDATA xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">
<!-- base64 encoded / PFX encoded and encrypted IDC with the private key -->
</IDENTTYDATA>
</PEERIDENTITYEXPORT>
Requirements
OS Versions: Windows CE 5.0 and later.
Header: p2p.h.
Link Library: p2p.lib.
See Also
Send Feedback on this topic to the authors