I am using CredUIPromptForCredentials to prompt the user for credentials which are then passed to a web service.
The prompt shows the “Remember my password” option, so that User Name and Password can be populated with previously used values.
When the prompt appears and the credentials are pre-filled, I can’t proceed until I actually select the User Name from the drop-down.
This is the screen I am seeing:

Clicking OK does nothing but bring up the Examples tip, but if I manually select “Greg” from the drop-down, I am able to proceed.
Here’s the code I’m using:
StringBuilder userPassword = new StringBuilder(), userID = new StringBuilder();
CREDUI_INFO credUI = new CREDUI_INFO();
credUI.cbSize = Marshal.SizeOf(credUI);
bool save = true;
CREDUI_FLAGS flags = CREDUI_FLAGS.ALWAYS_SHOW_UI | CREDUI_FLAGS.GENERIC_CREDENTIALS
| CREDUI_FLAGS.SHOW_SAVE_CHECK_BOX ;
//Display password prompt:
CredUIReturnCodes returnCode = CredUIPromptForCredentials
(ref credUI, this.serverName, IntPtr.Zero, 0, userID, 100, userPassword, 100, ref save, flags);
OS is Windows 7 and Server 2008 r2.
I have created a complete but simple sample application which can be downloaded from https://docs.google.com/open?id=0BxSAZ9JlU2w9VHZWWFBjVEhTNG02N1Q4WkFrUkhDUQ for testing.
Setting
save = falsesolves the problem.The checkbox will not be checked by default, but if it is checked the password will be saved allow the user will be able to proceed without changing input values on subsequent attempts.