ICredentialProvider::Advise method

Allows a credential provider to initiate events in the Logon UI or Credential UI through a callback interface.

Syntax


HRESULT Advise(
  [in] ICredentialProviderEvents *pcpe,
  [in] UINT_PTR                  upAdviseContext
);

Parameters

pcpe [in]

Type: ICredentialProviderEvents*

A pointer to an ICredentialProviderEvents callback interface to be used as the notification mechanism.

upAdviseContext [in]

Type: UINT_PTR

A pointer to an integer that uniquely identifies which credential provider has requested re-enumeration.

Return value

Type: HRESULT

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

Remarks

The method does not need to be implemented, and should return E_NOTIMPL if it doesn't. There might be no reason to call it, such as if the Logon UI or Credential UI never changes or updates.

This method enables the Logon UI and the Credential UI to pass an ICredentialProviderEvents pointer to the credential provider. This enables the credential provider to have asynchronous callback communication with the Logon or Credential UI. For example, a smart card provider might want to enumerate credentials again when a new smart card is inserted. In order to trigger the Logon UI to get credentials again, the credential provider should call CredentialsChanged providing the upAdviseContext identifier.

Credential providers that implement this method have the responsibility of calling AddRef on the provided ICredentialProviderEvents. Those credential providers also need to call Release during the UnAdvise method.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Credentialprovider.h

IDL

Credentialprovider.idl

See also

ICredentialProvider
ICredentialProvider::UnAdvise

 

 

Show: