SspiPrepareForCredRead function (sspi.h)

Generates a target name and credential type from the specified identity structure.

The values that this function generates can be passed as the values of the TargetName and Type parameters in a call to the CredRead function.

Syntax

SECURITY_STATUS SEC_ENTRY SspiPrepareForCredRead(
  [in]  PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity,
  [in]  PCWSTR                          pszTargetName,
  [out] PULONG                          pCredmanCredentialType,
  [out] PCWSTR                          *ppszCredmanTargetName
);

Parameters

[in] AuthIdentity

The identity structure from which to generate the credentials to be passed to the CredRead function.

[in] pszTargetName

A target name that can be modified by this function depending on the value of the AuthIdentity parameter.

[out] pCredmanCredentialType

The credential type to pass to the CredRead function.

[out] ppszCredmanTargetName

The target name to pass to the CredRead function.

Return value

If the function succeeds, it returns SEC_E_OK.

If the function fails, it returns a nonzero error code.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header sspi.h
Library Secur32.lib
DLL SspiCli.dll