The CredentialsDialog is a C# project for wrapping the CredUIPromptForCredentials system call for use in .NET. In addition to wrapping this call it supplies the ability to extend the system dialog with winforms controls through ExtensionPanels. Currently a single ExtensionPanel is supplied which adds an "Add New User" link to the dialog.
The project is supplied under a BSD style license, which provides all of the source code and allows you to modify and redistribute the source and/or binary provided you include the license as is.
CredentialsDialog - v1.0.zip (32.97 kb) (Released 7/10/04)
CredentialsDialog - v1.1.zip (47.87 kb) (Released 16/10/04)
Version 1.1 adds support Windows 2000. Win2K doesn't support the CredUIPromptForCredentials API call so a fully managed credentials dialog is added which is used for Win2K and earlier operating systems. The dialog has a similar look and feel, but is not identical.
Support for extension panels is maintained without the panel requiring any knowledge of which dialog is being used, though version 1.0 panels may require some changes to support this.
Saving of credentials is supported via the data protection API. This is only supported on Windows 2000 (as earlier perating systems don't support the DPAPI, earlier systems should have the remember checkbox disabled.
NOTE: Currently this hasn't had any testing on earlier operating systems. I am waiting for feedback from testing on windows 2000. Any feedback on its behaviour on other operating systems would be appreciated.
|CredentialsDialog with CreateUserExtensionPanel
A sample application shows the basics of how to use the CredentialsDialog.