CredGetSessionTypes function
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
- MaximumPersistCount [in]
-
Number of elements in the MaximumPersist array. Use CRED_TYPE_MAXIMUM to return all of the currently defined credential types.
- MaximumPersist [out]
-
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
That is, MaximumPersist[CRED_TYPE_GENERIC] specifies the maximum persistence supported for generic credentials.
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
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|