CredGetSessionTypes function (wincred.h)
The CredGetSessionTypes function returns the maximum persistence supported by the current logon session. A separate maximum persistence is returned for each credential type.
Syntax
BOOL CredGetSessionTypes(
[in] DWORD MaximumPersistCount,
[out] LPDWORD MaximumPersist
);
Parameters
[in] MaximumPersistCount
Number of elements in the MaximumPersist array. Use CRED_TYPE_MAXIMUM to return all of the currently defined credential types.
[out] MaximumPersist
Pointer to an array to return the persistence values in. The passed in array should be MaximumPersistCount elements long. On return, each element specifies the maximum persistence supported by the corresponding credential type.
The caller should use one of the following defines to index into the array:
- CRED_TYPE_GENERIC
- CRED_TYPE_DOMAIN_PASSWORD
- CRED_TYPE_DOMAIN_CERTIFICATE
The following values can be returned in each element of the array.
Return value
This function returns TRUE on success and FALSE on failure. The GetLastError function can be called to get a more specific status code. The following status code can be returned:
ERROR_NO_SUCH_LOGON_SESSION
The logon session does not exist or there is no credential set associated with this logon session. Network logon sessions do not have an associated credential set.
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 | Advapi32.lib |
DLL | Advapi32.dll |