CredUIStoreSSOCredW function (wincred.h)

The CredUIStoreSSOCredW function stores a single logon credential.

Syntax

CREDUIAPI DWORD CredUIStoreSSOCredW(
  [in] PCWSTR pszRealm,
  [in] PCWSTR pszUsername,
  [in] PCWSTR pszPassword,
  [in] BOOL   bPersist
);

Parameters

[in] pszRealm

Pointer to a null-terminated string that specifies the realm. If this parameter is NULL, the default realm is used.

[in] pszUsername

Pointer to a null-terminated string that specifies the user's name.

[in] pszPassword

Pointer to a null-terminated string that specifies the user's password. When you have finished using the password, clear the password from memory by calling the SecureZeroMemory function. For more information about protecting passwords, see Handling Passwords.

[in] bPersist

Boolean value that specifies whether the credentials are persisted. If this value is TRUE, the credentials are persisted. If this value is FALSE, the credentials are not persisted.

Return value

The return value is a DWORD. A return value of ERROR_SUCCESS indicates the function was successful.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header wincred.h
Library Credui.lib
DLL Credui.dll

See also

CredUIReadSSOCredW