ICredentialProvider::SetUsageScenario method

Defines the scenarios for which the credential provider is valid. Called whenever the credential provider is initialized.

Syntax


HRESULT SetUsageScenario(
  [in]  CREDENTIAL_PROVIDER_USAGE_SCENARIO cpus,
  [in]  DWORD dwFlags
);

Parameters

cpus [in]

Type: CREDENTIAL_PROVIDER_USAGE_SCENARIO

A value from the CREDENTIAL_PROVIDER_USAGE_SCENARIO enumeration that specifies a situation under which the logon UI would like to know if it is supported.

dwFlags [in]

Type: DWORD

A value that specifies behavior for this method. This value can be a bitwise-OR combination of one or more of the following values defined in Wincred.h:

CREDUIWIN_GENERIC (0x00000001)

0x00000001. The caller is requesting that the credential provider return the user name and password in plain text. This value cannot be combined with CREDUIWIN_SECURE_PROMPT.

CREDUIWIN_CHECKBOX (0x00000002)

0x00000002. The Save check box is displayed in the dialog box.

CREDUIWIN_AUTHPACKAGE_ONLY (0x00000010)

0x00000010. Only credential providers that support the input authentication package should be enumerated. If credential providers do not support the input authentication package, they should enumerate zero user tiles. This value cannot be combined with CREDUIWIN_IN_CRED_ONLY.

CREDUIWIN_IN_CRED_ONLY (0x00000020)

0x00000020. If the provider can serialize the credentials, then it should enumerate a tile for that credential. No other tiles should be enumerated. Credential providers should use the input CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION in ICredentialProvider::SetSerialization and dwFlags in ICredentialProvider::SetUsageScenario in order to determine how many credential tiles to enumerate. This value cannot be combined with CREDUIWIN_AUTHPACKAGE_ONLY.

CREDUIWIN_ENUMERATE_ADMINS (0x00000100)

0x00000100. Credential providers should enumerate only administrators. This value is intended for UAC purposes only. We recommend that external callers not set this flag.

CREDUIWIN_ENUMERATE_CURRENT_USER (0x00000200)

0x00000200. Credential providers should enumerate a tile for the currently logged on user.

CREDUIWIN_SECURE_PROMPT (0x00001000)

0x00001000. Windows Vista with SP1 and later. The credential dialog box should be displayed on the secure desktop. This value cannot be combined with CREDUIWIN_GENERIC. Credential provider implementers can safely ignore thig flag.

CREDUIWIN_PACK_32_WOW (0x10000000)

0x10000000. Buffers passed to the provider are 32-bit. Buffers returned from the provider must also be 32-bit. This is necessary for WOW64.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is required.

If this method returns S_OK, the logon UI has verified that the scenario is supported and can proceed from there.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Credentialprovider.h

IDL

Credentialprovider.idl

 

 

Community Additions

ADD
Show:
© 2015 Microsoft