CredUIReadSSOCredW function (wincred.h)

The CredUIReadSSOCredW function retrieves the user name for a single logon credential.

Syntax

CREDUIAPI DWORD CredUIReadSSOCredW(
  [in]  PCWSTR pszRealm,
  [out] PWSTR  *ppszUsername
);

Parameters

[in] pszRealm

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

[out] ppszUsername

Pointer to a pointer to a null-terminated string. When you have finished using the string, free ppszUsername by calling the LocalFree function.

Return value

The return value is a DWORD. The following table lists the possible values.

Return code Description
ERROR_SUCCESS
The function was successful.
ERROR_NOT_FOUND
The credential was not found.

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

CredUIStoreSSOCredW