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?