CredWrite (Windows CE 5.0)
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 );
- [in] Pointer to the credential that has to be added.
- [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.
Link Library: Coredll.lib.
Send Feedback on this topic to the authors