Credential Provider window events

Richard Begg 1 Reputation point
2021-04-16T00:58:42.463+00:00

I have a V2 credential provider that enforces custom password policy with interactive UI feedback.
Everything works as expected, except that the feedback window (opened in response to ICredentialProviderCredential::Advise() call) remains visible if the user cancels the change password operation.
It appears that LogonUI doesn't call UnAdvise() at the time the user clicks Cancel and I've yet to find any other working method (e.g. Windows events) of detecting the cancel event (presumably because of Secure Desktop).

To clarify, this is the flow:

  • Logged-in user invokes Ctrl-Alt-Del
  • LogonUI menu presented (Lock/Switch User/Change Password etc)
  • Change Password selected
  • Custom Credential provider UI initiated in response to ICredentialProviderCredential::Advise()
  • Cancel button clicked
  • LogonUI menu presented, but custom UI component remains visible.

It isn't until the user exits LogonUI completely, that UnAdvise() is called (which then cleans up everything).

Is there some other alternative to trigger the custom window closure?

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,754 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Carl Fan 241 Reputation points
    2021-04-16T10:16:10.76+00:00

    Hi,
    Hope the information below helpful to you.
    https://learn.microsoft.com/en-us/windows/win32/api/credentialprovider/nn-credentialprovider-icredentialprovidercredentialevents
    https://www.cnblogs.com/nightnine/p/7132658.html
    Also for this issue, I suggest that you could post it to github forum. As they will be more professional on your issue.
    https://github.com/DavidWeiss2/windows-Credential-Provider-library
    Hope this helps and please help to accept as Answer if the response is useful.
    Best Regards,
    Carl

    0 comments No comments