CredReadFn callback function (ntsecpkg.h)
Reads a credential from the Credential Manager.
Syntax
CredReadFn Credreadfn;
NTSTATUS Credreadfn(
[in] PLUID LogonId,
[in] ULONG CredFlags,
[in] LPWSTR TargetName,
[in] ULONG Type,
[in] ULONG Flags,
[out] PENCRYPTED_CREDENTIALW *Credential
)
{...}
Parameters
[in] LogonId
The logon ID for which to read credentials.
[in] CredFlags
Flags that determine the behavior of this function. The following flags are defined.
Value | Meaning |
---|---|
|
The caller is in-process. |
|
The caller should use the midl_user_allocate function to allocate the Credential buffer. |
|
Do not cache target information. |
|
The credential data is passed as clear text. |
|
The credential data is encrypted by using the RtlEncryptMemory function. |
|
The caller is a trusted process. |
[in] TargetName
The name of the target computer.
[in] Type
Specifies the type of the credential to read. The possible values for this parameter are the same as the possible values of the Type member of the CREDENTIAL structure.
[in] Flags
Reserved. This parameter must be set to zero.
[out] Credential
A pointer to a pointer to an ENCRYPTED_CREDENTIALW structure that receives the credentials that this function reads.
Return value
If the function succeeds, return STATUS_SUCCESS, or an informational status code.
If the function fails, return an NTSTATUS error code that indicates the reason it failed.
Remarks
A pointer to the CrediRead function is available in the LSA_SECPKG_FUNCTION_TABLE structure received by the SpInitialize function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntsecpkg.h |