CredWrite (Windows CE 5.0)

Send Feedback

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);

Parameters

  • 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.

Return Values

ERROR_SUCCESS is returned upon success. For a list of error codes, see Credential Manager Error Codes.

Remarks

The credential that has to be created must have wszTarget, wszUser, and pBlob values that are not NULL.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Cred.h.
Link Library: Coredll.lib.

See Also

Credential Manager Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.