StanB
StanB

Reputation: 31

Credential Provider. Displaying a kind of progress bar and disabling password or PIN field

I am developing a custom smart card credential provider based on Microsoft's samples http://www.microsoft.com/en-us/download/details.aspx?id=5372. In particular, I'm using a sample with wrapped provider, so I only need to add some new functions to existing ones. After pressing submit button provider should send authentification request to my server and in case of positive answer it should proceed further with standard Windows mechanism.

I have successfully done it placing my requesting code to the begining of GetSerialization method. But since this operation can take a long time, I need to inform user about current progress.

  1. First question. Is it a good idea to run my code from GetSerialization?

Since developer is not allowed to draw custom controls on logon screen (like progress bar), I decided to create a small topmost window containing current operation status and display it in the top right corner. At the same time I need to disable PIN field and submit button until operation is finished. But as I noticed here Disabling areas on Credential Provider, it's not possible from GetSerialization.

  1. Second question. What way would you recommend me to achieve this functionality?

  2. And third one. How can I use Credentials::Advice method to determine what exactly happened? Because what I only get is ICredentialProviderCredentialEvents* pcpce as a parameter, which I can use for calling it's methods, but I still have no idea, what is the source of this event. Is a key pressed or submit button or something else?

Any help would be appreciated)

Upvotes: 3

Views: 1423

Answers (1)

Alexander
Alexander

Reputation: 1341

  1. I just got the same ambiguity and do all server interaction inside of GetSerialisation - it is work fine. Delay from pressing submit to login approximately 2 seconds.
  2. Try to use a text field with running dot: '. ' ' . ' ' . ' ' . ' ' . ' ' .'
  3. Advise used to provide you context for your calls to LogonUI. For example to set text fields with updated values.

Upvotes: 1

Related Questions