简体   繁体   中英

Windows Security login form?

Do you know the awesome looking form of Windows Live that asks you for your cerdentials?
Gmail Notifier has it too, somehow.

Is there any way I can invoke something like this in my application?


BEHOLD!
看哪


I wish to use this dialog for local authentication on a desktop app.

You could look into calling CredUIPromptForWindowsCredentials :

From MSDN :

The CredUIPromptForWindowsCredentials function creates and displays a configurable dialog box that allows users to supply credential information by using any credential provider installed on the local computer.

But there is more to this than simply displaying the dialog and recieving / acting on input - you'll most likely be required to register an authentication provider on the system, among some other things I'm not entirely competent with explaining in any detail! Might give you a decent starting ground though.

UPDATE:

Oded compensated for my laziness and supplied the pinvoke.net link displaying definitions for this to be used in a managed environment:

CredUIPromptForWindowsCredentials PInvoke.NET Link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM