Defines the scenarios for which the credential provider is valid. Called whenever the credential provider is initialized.
HRESULT SetUsageScenario( CREDENTIAL_PROVIDER_USAGE_SCENARIO cpus, DWORD dwFlags );
The scenario the credential provider has been created in. This is the usage scenario that needs to be supported. See the Remarks for more information.
A value that affects the behavior of the credential provider. This value can be a bitwise-OR combination of one or more of the following values defined in Wincred.h. See CredUIPromptForWindowsCredentials for more information.
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.
0x00000002. The Save check box is displayed in the dialog box.
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.
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.
0x00000100. Credential providers should enumerate only administrators. This value is intended for UAC purposes only. We recommend that external callers not set this flag.
0x00000200. Credential providers should enumerate a tile for the currently logged on user.
0x00001000. 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 this flag.
0x10000000. Buffers passed to the provider are 32-bit. Buffers returned from the provider must also be 32-bit. This is necessary for WOW64.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This method is required and enables the credential provider to indicate how it will be used.
This method should return E_NOTIMPL if the call completes but the requested usage scenario is not supported. This method should return S_OK if the method is successful and the usage scenario is supported.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|