Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This function creates a credential that is uniquely identified by the tuple that contains the credential type and the target ID associated with the credential. If there is already a credential corresponding to that tuple, then it is updated unless flags explicitly override that behavior. This function replaces CeCredWrite.
HRESULT CredWrite( PCRED pCred, DWORD dwFlags);
- pCred
[in] Pointer to the credential that has to be added. - dwFlags
[in] Flags that determine behavior when credential already exists, and can be one of the following flags.Flag Description CRED_FLAG_FAIL_IF_EXISTING If credential already exists then the call to CredWrite will fail. CRED_FLAG_NO_BLOB_HANDLING Meant for use by trusted SSPs. For more information, see HandleBlob.
ERROR_SUCCESS is returned upon success. For a list of error codes, see Credential Manager Error Codes.
The credential that has to be created must have wszTarget, wszUser, and pBlob values that are not NULL.
OS Versions: Windows CE .NET 4.0 and later.
Header: Cred.h.
Link Library: Coredll.lib.
Send Feedback on this topic to the authors