Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Updating a Vista Credential Tile with a timer

78 views
Skip to first unread message

sushi_cw

unread,
Nov 15, 2007, 2:02:02 PM11/15/07
to
I've been working on a Credential Provider to replace functionality that was
formerly part of a custom GINA in XP. Previously, the GINA would occasionally
check to see if the machine was reserved, and if so would change its UI
appropriately. I am trying to figure out how to get this functionality into a
Vista Credential Provider.

So far, it isn't looking good. From what I've seen, LogonUI will only allow
a Credential Tile to update its UI when it "Advises" it, which only happens
on user-driven events. Am I correct in thinking that this means I can't
update the tile based on some sort of timer? Or is there some way to do this
that I'm not aware of?

The only other idea I have is to put all of the UI that would change on a
timer in a separate dialog, and float this dialog off to the side of the
credential tile. The dialog would have its own separate timer thread to keep
it updated. I'd prefer to avoid such a hackish solution, but I'm not sure I
have a choice (assuming it's feasible... is it?).

Thanks in advance for any advice!

--
sushi_cw


sushi_cw

unread,
Jan 15, 2008, 6:22:00 PM1/15/08
to
Following up on my own question:

1. No, the elements provided in the CP can't be updated on a timer.
2. Creating floating dialogs and putting info in them is indeed possible.
The "Advise" method passes in an interface from which the handle to the
logonUI can be obtained, and child windows can be created and attached to it
just fine.

sushi_cw

unread,
Feb 5, 2008, 1:43:00 PM2/5/08
to
dmm,

First, a disclaimer: I don't work for MS and I'm not an expert in Windows
programming, so I could be wrong in some of the conclusions I've drawn.
Anyone who knows better, feel free to correct me.

A timer can in fact be implemented in the Credential Provider/Credential
Tile. That's not the problem. The problem is that the CP architecture doesn't
give the CP full control over the controls used to log in. This is
intentional, and for good reasons.

There's nothing to stop you from implementing a timer. What you can't do is
update the controls on the credential tile based on that timer.

The reason is that the LogonUI is the one that has control over those
controls, not the credential tile. There is a mechanism provided to let the
credential tile tell the LogonUI to update or change elements: it's the
ICredentialProviderCredentialEvents interface. However, this is only
available to the credential tile when "Advised" by the LogonUI, which only
happens when the user does something (type in a text box, select an option,
deselect the tile, etc). The LogonUI will call your tiles' Advise, then the
method designed to handle the user input (whatever it was), then UnAdvise.
The ICredentialProviderCredentialEvents callback provided in Advise is only
good until UnAdvise is called, so you can't save the passed-in pointer and
have your timer use it (MS says it won't work; I tried, they're right).

I hope that made sense. It was probably more info than you wanted, but will
hopefully save somebody time when they run across it.

Oh, and the secondary plan I had (to use floating dialogs and update them on
a timer) works beautifully. The ICredentialProviderCredentialEvents interface
incldues a method for getting a window handle just for this purpose.

"dmm" wrote:

> Just out of curiosity since I face a similar issue, why can't a timer be
> implemented in a CP? Is is not possible to configure a timer callback in the
> CP? Does the LogonUI prevent all timer messages from passing through to
> credential providers?
>
> Thanks
> dmm

dmm

unread,
Feb 5, 2008, 2:44:01 PM2/5/08
to

dmm

unread,
Feb 5, 2008, 3:10:00 PM2/5/08
to
Hi sushi_cw

Quite the contrary, I can use all the information I can get for this new way
of logging onto a Vista system!

In a way, I think that my situation is similar to yours. In the XP
replacement GINA environment, I currently support several dialogs that are
backed by proprietary DLLs. This software is responsible for displaying a
list of users, password prompting and fingerprint acquisition. It is driven
by a timer which queries my service executable for internal verification of
user credentials as they are entered.

I wish to copy this functionality to the Vista environment. My intent is to
make use of much of the existing software by integrating with my COM-based
CP, which is modeled from the MSDN article "Create Custom Login Experiences
with Credential Providers for Windows Vista."

In XP, after a user selects a name, enters a password and fingerprint, I
convert these credentials to the system credentials for verification during a
SAS event.

In Vista, how can I trigger LogonUI to fetch these credentials for
verification?

Thanks
dmm

sushi_cw

unread,
Feb 6, 2008, 10:33:02 AM2/6/08
to
In my implementation, all of the "custom" authentication happens from the
GetSerialization method. This gets called right after the user submits their
creds (via blue arrow button or enter key). If you look at the code for
GetSerialization in any of the CP samples, it should be pretty obvious how to
do that.

In your case, though, it may be different. It sounds like you don't need any
of the "built in" login controls at all: everything exists already in a
separate dialog. If that's the case, I'm guessing you want to use your own
submit button, which means you won't need the one provided by the CP.

I'm not exactly sure how to do that, although I'll hazard a guess. Maybe you
could use the CP's autologon functionality, but have the execution wait for
your custom dialog(s) to complete. I believe that if you use autologon, the
GetSerialization method is called almost immediately: maybe you could bring
your dialog up there, then continue GetSerialization once it's complete using
whatever credentials are specified in the dialogs. GetSerialization is
wrapped in an Advise/UnAdvise block, so you'll have that pointer from which
to generate your dialogs.

dmm

unread,
Feb 7, 2008, 2:44:02 PM2/7/08
to
Hi sushi_cw

Thanks for the great idea! I'll have a chance to begin experimenting with
the vista credential provider paradigm in the next couple of weeks. I'll
post the results ...

dmm

0 new messages