Compartilhar via


PeerIdentityGetCryptKey (Windows CE 5.0)

Send Feedback

This function retrieves a handle to a cryptographic service provider (CSP).

HRESULT WINAPI PeerIdentityGetCryptKey(  PCWSTR pwzIdentity,  HCRYPTPROV* phCryptProv);

Parameters

  • pwzIdentity
    [in] Specifies the peer identity to retrieve the key pair for.
  • phCryptProv
    [out] Receives a pointer to the handle of the cryptographic service provider (CSP) that contains an AT_KEYEXCHANGE RSA key pair.

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 key can be retrieved by calling CryptGetUserKey.

When the handle is not required anymore, the application is responsible for releasing the handle by using CryptReleaseContext.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: p2p.h.
Link Library: p2p.lib.

See Also

Identity Manager Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.