Export (0) Print
Expand All
Expand Minimize

CrediRead function

Reads a credential from the Credential Manager.

Syntax


NTSTATUS NTAPI CrediRead(
  _In_   PLUID LogonId,
  _In_   ULONG CredFlags,
  _In_   LPWSTR TargetName,
  _In_   ULONG Type,
  _In_   ULONG Flags,
  _Out_  PENCRYPTED_CREDENTIALW *Credential
);

Parameters

LogonId [in]

The logon ID for which to read credentials.

CredFlags [in]

Flags that determine the behavior of this function. The following flags are defined.

ValueMeaning
CREDP_FLAGS_IN_PROCESS
0x01

The caller is in-process.

CREDP_FLAGS_USE_MIDL_HEAP
0x02

The caller should use the midl_user_allocate function to allocate the Credential buffer.

CREDP_FLAGS_DONT_CACHE_TI
0x04

Do not cache target information.

CREDP_FLAGS_CLEAR_PASSWORD
0x08

The credential data is passed as clear text.

CREDP_FLAGS_USER_ENCRYPTED_PASSWORD
0x10

The credential data is encrypted by using the RtlEncryptMemory function.

CREDP_FLAGS_TRUSTED_CALLER
0x20

The caller is a trusted process.

 

TargetName [in]

The name of the target computer.

Type [in]

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.

Flags [in]

Reserved. This parameter must be set to zero.

Credential [out]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecpkg.h

See also

SpInitialize

 

 

Community Additions

ADD
Show:
© 2014 Microsoft