ReactOS 0.4.16-dev-980-g00983aa
credui_main.c
Go to the documentation of this file.
1/*
2 * Credentials User Interface
3 *
4 * Copyright 2006 Robert Shearman (for CodeWeavers)
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <stdarg.h>
22#ifdef __REACTOS__
23#include <wchar.h>
24#endif
25
26#include "windef.h"
27#include "winbase.h"
28#include "winnt.h"
29#include "winuser.h"
30#include "wincred.h"
31#include "rpc.h"
32#include "sspi.h"
33#include "commctrl.h"
34
35#include "credui_resources.h"
36
37#include "wine/debug.h"
38#include "wine/list.h"
39
41
42#define TOOLID_INCORRECTPASSWORD 1
43#define TOOLID_CAPSLOCKON 2
44
45#define ID_CAPSLOCKPOP 1
46
48{
49 struct list entry;
53 BOOL generic;
54};
55
57
59
62{
65 0, 0, { (DWORD_PTR)(__FILE__ ": csPendingCredentials") }
66};
67static CRITICAL_SECTION csPendingCredentials = { &critsect_debug, -1, 0, 0, 0, 0 };
68
69
71{
72 struct pending_credentials *entry, *cursor2;
73 TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
74
75 switch (fdwReason)
76 {
77#ifndef __REACTOS__
78 case DLL_WINE_PREATTACH:
79 return FALSE; /* prefer native version */
80#endif
81
84 hinstCredUI = hinstDLL;
86 break;
87
89 if (lpvReserved) break;
91 {
92 list_remove(&entry->entry);
93
94 HeapFree(GetProcessHeap(), 0, entry->pszTargetName);
95 HeapFree(GetProcessHeap(), 0, entry->pszUsername);
96 SecureZeroMemory(entry->pszPassword, lstrlenW(entry->pszPassword) * sizeof(WCHAR));
97 HeapFree(GetProcessHeap(), 0, entry->pszPassword);
99 }
101 break;
102 }
103
104 return TRUE;
105}
106
107static DWORD save_credentials(PCWSTR pszTargetName, PCWSTR pszUsername,
108 PCWSTR pszPassword, BOOL generic)
109{
110 CREDENTIALW cred;
111
112 TRACE("saving servername %s with username %s\n", debugstr_w(pszTargetName), debugstr_w(pszUsername));
113
114 cred.Flags = 0;
116 cred.TargetName = (LPWSTR)pszTargetName;
117 cred.Comment = NULL;
118 cred.CredentialBlobSize = lstrlenW(pszPassword) * sizeof(WCHAR);
119 cred.CredentialBlob = (LPBYTE)pszPassword;
121 cred.AttributeCount = 0;
122 cred.Attributes = NULL;
123 cred.TargetAlias = NULL;
124 cred.UserName = (LPWSTR)pszUsername;
125
126 if (CredWriteW(&cred, 0))
127 return ERROR_SUCCESS;
128 else
129 {
131 ERR("CredWriteW failed with error %d\n", ret);
132 return ret;
133 }
134}
135
137{
150};
151
152static void CredDialogFillUsernameCombo(HWND hwndUsername, const struct cred_dialog_params *params)
153{
154 DWORD count;
155 DWORD i;
156 PCREDENTIALW *credentials;
157
158 if (!CredEnumerateW(NULL, 0, &count, &credentials))
159 return;
160
161 for (i = 0; i < count; i++)
162 {
163 COMBOBOXEXITEMW comboitem;
164 DWORD j;
165 BOOL duplicate = FALSE;
166
167 if (!credentials[i]->UserName)
168 continue;
169
171 {
172 if (credentials[i]->Type != CRED_TYPE_GENERIC)
173 {
174 credentials[i]->UserName = NULL;
175 continue;
176 }
177 }
178 else if (credentials[i]->Type == CRED_TYPE_GENERIC)
179 {
180 credentials[i]->UserName = NULL;
181 continue;
182 }
183
184 /* don't add another item with the same name if we've already added it */
185 for (j = 0; j < i; j++)
186 if (credentials[j]->UserName
187 && !lstrcmpW(credentials[i]->UserName, credentials[j]->UserName))
188 {
189 duplicate = TRUE;
190 break;
191 }
192
193 if (duplicate)
194 continue;
195
196 comboitem.mask = CBEIF_TEXT;
197 comboitem.iItem = -1;
198 comboitem.pszText = credentials[i]->UserName;
199 SendMessageW(hwndUsername, CBEM_INSERTITEMW, 0, (LPARAM)&comboitem);
200 }
201
202 CredFree(credentials);
203}
204
206{
207 TTTOOLINFOW toolinfo;
208 WCHAR wszText[256];
209
210 if (params->hwndBalloonTip)
211 return;
212
217 SetWindowPos(params->hwndBalloonTip, HWND_TOPMOST, 0, 0, 0, 0,
219
221 {
222 ERR("failed to load IDS_INCORRECTPASSWORD\n");
223 return;
224 }
225
226 toolinfo.cbSize = sizeof(toolinfo);
227 toolinfo.uFlags = TTF_TRACK;
228 toolinfo.hwnd = hwndDlg;
229 toolinfo.uId = TOOLID_INCORRECTPASSWORD;
230 SetRectEmpty(&toolinfo.rect);
231 toolinfo.hinst = NULL;
232 toolinfo.lpszText = wszText;
233 toolinfo.lParam = 0;
234 toolinfo.lpReserved = NULL;
235 SendMessageW(params->hwndBalloonTip, TTM_ADDTOOLW, 0, (LPARAM)&toolinfo);
236
237 if (!LoadStringW(hinstCredUI, IDS_CAPSLOCKON, wszText, ARRAY_SIZE(wszText)))
238 {
239 ERR("failed to load IDS_CAPSLOCKON\n");
240 return;
241 }
242
243 toolinfo.uId = TOOLID_CAPSLOCKON;
244 SendMessageW(params->hwndBalloonTip, TTM_ADDTOOLW, 0, (LPARAM)&toolinfo);
245}
246
248{
249 TTTOOLINFOW toolinfo;
250 RECT rcPassword;
251 INT x;
252 INT y;
253 WCHAR wszTitle[256];
254
255 /* user name likely wrong so balloon would be confusing. focus is also
256 * not set to the password edit box, so more notification would need to be
257 * handled */
258 if (!params->pszUsername[0])
259 return;
260
261 /* don't show two balloon tips at once */
262 if (params->fBalloonTipActive)
263 return;
264
266 {
267 ERR("failed to load IDS_INCORRECTPASSWORDTITLE\n");
268 return;
269 }
270
272
273 memset(&toolinfo, 0, sizeof(toolinfo));
274 toolinfo.cbSize = sizeof(toolinfo);
275 toolinfo.hwnd = hwndDlg;
276 toolinfo.uId = TOOLID_INCORRECTPASSWORD;
277
278 SendMessageW(params->hwndBalloonTip, TTM_SETTITLEW, TTI_ERROR, (LPARAM)wszTitle);
279
280 GetWindowRect(GetDlgItem(hwndDlg, IDC_PASSWORD), &rcPassword);
281 /* centered vertically and in the right side of the password edit control */
282 x = rcPassword.right - 12;
283 y = (rcPassword.top + rcPassword.bottom) / 2;
284 SendMessageW(params->hwndBalloonTip, TTM_TRACKPOSITION, 0, MAKELONG(x, y));
285
286 SendMessageW(params->hwndBalloonTip, TTM_TRACKACTIVATE, TRUE, (LPARAM)&toolinfo);
287
288 params->fBalloonTipActive = TRUE;
289}
290
292{
293 TTTOOLINFOW toolinfo;
294 RECT rcPassword;
295 INT x;
296 INT y;
297 WCHAR wszTitle[256];
298
299 /* don't show two balloon tips at once */
300 if (params->fBalloonTipActive)
301 return;
302
303 if (!LoadStringW(hinstCredUI, IDS_CAPSLOCKONTITLE, wszTitle, ARRAY_SIZE(wszTitle)))
304 {
305 ERR("failed to load IDS_IDSCAPSLOCKONTITLE\n");
306 return;
307 }
308
310
311 memset(&toolinfo, 0, sizeof(toolinfo));
312 toolinfo.cbSize = sizeof(toolinfo);
313 toolinfo.hwnd = hwndDlg;
314 toolinfo.uId = TOOLID_CAPSLOCKON;
315
316 SendMessageW(params->hwndBalloonTip, TTM_SETTITLEW, TTI_WARNING, (LPARAM)wszTitle);
317
318 GetWindowRect(GetDlgItem(hwndDlg, IDC_PASSWORD), &rcPassword);
319 /* just inside the left side of the password edit control */
320 x = rcPassword.left + 12;
321 y = rcPassword.bottom - 3;
322 SendMessageW(params->hwndBalloonTip, TTM_TRACKPOSITION, 0, MAKELONG(x, y));
323
324 SendMessageW(params->hwndBalloonTip, TTM_TRACKACTIVATE, TRUE, (LPARAM)&toolinfo);
325
326 SetTimer(hwndDlg, ID_CAPSLOCKPOP,
327 SendMessageW(params->hwndBalloonTip, TTM_GETDELAYTIME, TTDT_AUTOPOP, 0),
328 NULL);
329
330 params->fBalloonTipActive = TRUE;
331}
332
334{
335 TTTOOLINFOW toolinfo;
336
337 if (!params->hwndBalloonTip)
338 return;
339
340 memset(&toolinfo, 0, sizeof(toolinfo));
341
342 toolinfo.cbSize = sizeof(toolinfo);
343 toolinfo.hwnd = hwndDlg;
344 toolinfo.uId = 0;
345 SendMessageW(params->hwndBalloonTip, TTM_TRACKACTIVATE, FALSE, (LPARAM)&toolinfo);
346 toolinfo.uId = 1;
347 SendMessageW(params->hwndBalloonTip, TTM_TRACKACTIVATE, FALSE, (LPARAM)&toolinfo);
348
349 params->fBalloonTipActive = FALSE;
350}
351
352static inline BOOL CredDialogCapsLockOn(void)
353{
354 return (GetKeyState(VK_CAPITAL) & 0x1) != 0;
355}
356
359{
361 switch (uMsg)
362 {
363 case WM_KEYDOWN:
364 if (wParam == VK_CAPITAL)
365 {
366 HWND hwndDlg = GetParent(hwnd);
369 else
371 }
372 break;
373 case WM_DESTROY:
375 break;
376 }
377 return DefSubclassProc(hwnd, uMsg, wParam, lParam);
378}
379
381{
382 HWND hwndUsername = GetDlgItem(hwndDlg, IDC_USERNAME);
383 HWND hwndPassword = GetDlgItem(hwndDlg, IDC_PASSWORD);
384
386
387 if (params->hbmBanner)
389 IMAGE_BITMAP, (LPARAM)params->hbmBanner);
390
391 if (params->pszMessageText)
392 SetDlgItemTextW(hwndDlg, IDC_MESSAGE, params->pszMessageText);
393 else
394 {
395 WCHAR format[256];
396 WCHAR message[256];
398 swprintf(message, format, params->pszTargetName);
400 }
401 SetWindowTextW(hwndUsername, params->pszUsername);
402 SetWindowTextW(hwndPassword, params->pszPassword);
403
404 CredDialogFillUsernameCombo(hwndUsername, params);
405
406 if (params->pszUsername[0])
407 {
408 /* prevent showing a balloon tip here */
409 params->fBalloonTipActive = TRUE;
410 SetFocus(hwndPassword);
411 params->fBalloonTipActive = FALSE;
412 }
413 else
414 SetFocus(hwndUsername);
415
416 if (params->pszCaptionText)
417 SetWindowTextW(hwndDlg, params->pszCaptionText);
418 else
419 {
420 WCHAR format[256];
421 WCHAR title[256];
423 swprintf(title, format, params->pszTargetName);
424 SetWindowTextW(hwndDlg, title);
425 }
426
427 if (params->dwFlags & CREDUI_FLAGS_PERSIST ||
431 else if (params->fSave)
433
434 /* setup subclassing for Caps Lock detection */
436
439 else if ((GetFocus() == hwndPassword) && CredDialogCapsLockOn())
441
442 return FALSE;
443}
444
446{
447 HWND hwndUsername = GetDlgItem(hwndDlg, IDC_USERNAME);
448 LPWSTR user;
449 INT len;
450 INT len2;
451
452 len = GetWindowTextLengthW(hwndUsername);
453 user = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
454 GetWindowTextW(hwndUsername, user, len + 1);
455
456 if (!user[0])
457 {
459 return;
460 }
461
462 if (!wcschr(user, '\\') && !wcschr(user, '@'))
463 {
464 ULONG len_target = lstrlenW(params->pszTargetName);
465 memcpy(params->pszUsername, params->pszTargetName,
466 min(len_target, params->ulUsernameMaxChars) * sizeof(WCHAR));
467 if (len_target + 1 < params->ulUsernameMaxChars)
468 params->pszUsername[len_target] = '\\';
469 if (len_target + 2 < params->ulUsernameMaxChars)
470 params->pszUsername[len_target + 1] = '\0';
471 }
472 else if (params->ulUsernameMaxChars > 0)
473 params->pszUsername[0] = '\0';
474
475 len2 = lstrlenW(params->pszUsername);
476 memcpy(params->pszUsername + len2, user, min(len, params->ulUsernameMaxChars - len2) * sizeof(WCHAR));
477 if (params->ulUsernameMaxChars)
478 params->pszUsername[len2 + min(len, params->ulUsernameMaxChars - len2 - 1)] = '\0';
479
481
482 GetDlgItemTextW(hwndDlg, IDC_PASSWORD, params->pszPassword,
483 params->ulPasswordMaxChars);
484
485 params->fSave = IsDlgButtonChecked(hwndDlg, IDC_SAVE) == BST_CHECKED;
486
487 EndDialog(hwndDlg, IDOK);
488}
489
492{
493 switch (uMsg)
494 {
495 case WM_INITDIALOG:
496 {
498
499 return CredDialogInit(hwndDlg, params);
500 }
501 case WM_COMMAND:
502 switch (wParam)
503 {
504 case MAKELONG(IDOK, BN_CLICKED):
505 {
506 struct cred_dialog_params *params =
508 CredDialogCommandOk(hwndDlg, params);
509 return TRUE;
510 }
512 EndDialog(hwndDlg, IDCANCEL);
513 return TRUE;
516 {
517 struct cred_dialog_params *params =
520 }
521 /* don't allow another window to steal focus while the
522 * user is typing their password */
523 LockSetForegroundWindow(LSFW_LOCK);
524 return TRUE;
526 {
527 struct cred_dialog_params *params =
529 /* the user is no longer typing their password, so allow
530 * other windows to become foreground ones */
531 LockSetForegroundWindow(LSFW_UNLOCK);
533 return TRUE;
534 }
536 {
537 struct cred_dialog_params *params =
540 return TRUE;
541 }
542 }
543 return FALSE;
544 case WM_TIMER:
545 if (wParam == ID_CAPSLOCKPOP)
546 {
547 struct cred_dialog_params *params =
550 return TRUE;
551 }
552 return FALSE;
553 case WM_DESTROY:
554 {
555 struct cred_dialog_params *params =
557 if (params->hwndBalloonTip) DestroyWindow(params->hwndBalloonTip);
558 return TRUE;
559 }
560 default:
561 return FALSE;
562 }
563}
564
566 WCHAR *password, ULONG len_password)
567{
568 DWORD count, i;
569 CREDENTIALW **credentials;
570
571 if (!CredEnumerateW(target, 0, &count, &credentials)) return FALSE;
572 for (i = 0; i < count; i++)
573 {
574 if (credentials[i]->Type != CRED_TYPE_DOMAIN_PASSWORD &&
575 credentials[i]->Type != CRED_TYPE_GENERIC)
576 {
577 FIXME("no support for type %u credentials\n", credentials[i]->Type);
578 continue;
579 }
580 if ((!*username || !lstrcmpW(username, credentials[i]->UserName)) &&
581 lstrlenW(credentials[i]->UserName) < len_username &&
582 credentials[i]->CredentialBlobSize / sizeof(WCHAR) < len_password)
583 {
584 TRACE("found existing credential for %s\n", debugstr_w(credentials[i]->UserName));
585
586 lstrcpyW(username, credentials[i]->UserName);
587 memcpy(password, credentials[i]->CredentialBlob, credentials[i]->CredentialBlobSize);
588 password[credentials[i]->CredentialBlobSize / sizeof(WCHAR)] = 0;
589
590 CredFree(credentials);
591 return TRUE;
592 }
593 }
594 CredFree(credentials);
595 return FALSE;
596}
597
598/******************************************************************************
599 * CredUIPromptForCredentialsW [CREDUI.@]
600 */
602 PCWSTR pszTargetName,
604 DWORD dwAuthError,
605 PWSTR pszUsername,
606 ULONG ulUsernameMaxChars,
607 PWSTR pszPassword,
608 ULONG ulPasswordMaxChars, PBOOL pfSave,
610{
611 INT_PTR ret;
614
615 TRACE("(%p, %s, %p, %d, %s, %d, %p, %d, %p, 0x%08x)\n", pUIInfo,
616 debugstr_w(pszTargetName), Reserved, dwAuthError, debugstr_w(pszUsername),
617 ulUsernameMaxChars, pszPassword, ulPasswordMaxChars, pfSave, dwFlags);
618
620 return ERROR_INVALID_FLAGS;
621
622 if (!pszTargetName)
624
625 if ((dwFlags & CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX) && !pfSave)
627
630 find_existing_credential(pszTargetName, pszUsername, ulUsernameMaxChars, pszPassword, ulPasswordMaxChars))
631 return ERROR_SUCCESS;
632
633 params.pszTargetName = pszTargetName;
634 if (pUIInfo)
635 {
636 params.pszMessageText = pUIInfo->pszMessageText;
637 params.pszCaptionText = pUIInfo->pszCaptionText;
638 params.hbmBanner = pUIInfo->hbmBanner;
639 }
640 else
641 {
642 params.pszMessageText = NULL;
643 params.pszCaptionText = NULL;
644 params.hbmBanner = NULL;
645 }
646 params.pszUsername = pszUsername;
647 params.ulUsernameMaxChars = ulUsernameMaxChars;
648 params.pszPassword = pszPassword;
649 params.ulPasswordMaxChars = ulPasswordMaxChars;
650 params.fSave = pfSave ? *pfSave : FALSE;
651 params.dwFlags = dwFlags;
652 params.hwndBalloonTip = NULL;
653 params.fBalloonTipActive = FALSE;
654
656 pUIInfo ? pUIInfo->hwndParent : NULL,
658 if (ret <= 0)
659 return GetLastError();
660
661 if (ret == IDCANCEL)
662 {
663 TRACE("dialog cancelled\n");
664 return ERROR_CANCELLED;
665 }
666
667 if (pfSave)
668 *pfSave = params.fSave;
669
670 if (params.fSave)
671 {
673 {
674 BOOL found = FALSE;
676 int len;
677
679
680 /* find existing pending credentials for the same target and overwrite */
681 /* FIXME: is this correct? */
683 if (!lstrcmpW(pszTargetName, entry->pszTargetName))
684 {
685 found = TRUE;
686 HeapFree(GetProcessHeap(), 0, entry->pszUsername);
687 SecureZeroMemory(entry->pszPassword, lstrlenW(entry->pszPassword) * sizeof(WCHAR));
688 HeapFree(GetProcessHeap(), 0, entry->pszPassword);
689 }
690
691 if (!found)
692 {
693 entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*entry));
694 len = lstrlenW(pszTargetName);
695 entry->pszTargetName = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR));
696 memcpy(entry->pszTargetName, pszTargetName, (len + 1)*sizeof(WCHAR));
698 }
699
700 len = lstrlenW(params.pszUsername);
701 entry->pszUsername = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR));
702 memcpy(entry->pszUsername, params.pszUsername, (len + 1)*sizeof(WCHAR));
703 len = lstrlenW(params.pszPassword);
704 entry->pszPassword = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR));
705 memcpy(entry->pszPassword, params.pszPassword, (len + 1)*sizeof(WCHAR));
707
709 }
711 result = save_credentials(pszTargetName, pszUsername, pszPassword,
713 }
714
715 return result;
716}
717
718/******************************************************************************
719 * CredUIConfirmCredentialsW [CREDUI.@]
720 */
722{
725
726 TRACE("(%s, %s)\n", debugstr_w(pszTargetName), bConfirm ? "TRUE" : "FALSE");
727
728 if (!pszTargetName)
730
732
734 {
735 if (!lstrcmpW(pszTargetName, entry->pszTargetName))
736 {
737 if (bConfirm)
738 result = save_credentials(entry->pszTargetName, entry->pszUsername,
739 entry->pszPassword, entry->generic);
740 else
742
743 list_remove(&entry->entry);
744
745 HeapFree(GetProcessHeap(), 0, entry->pszTargetName);
746 HeapFree(GetProcessHeap(), 0, entry->pszUsername);
747 SecureZeroMemory(entry->pszPassword, lstrlenW(entry->pszPassword) * sizeof(WCHAR));
748 HeapFree(GetProcessHeap(), 0, entry->pszPassword);
750
751 break;
752 }
753 }
754
756
757 return result;
758}
759
760/******************************************************************************
761 * CredUIParseUserNameW [CREDUI.@]
762 */
764 ULONG ulMaxUserChars, PWSTR pszDomain,
765 ULONG ulMaxDomainChars)
766{
767 PWSTR p;
768
769 TRACE("(%s, %p, %d, %p, %d)\n", debugstr_w(pszUserName), pszUser,
770 ulMaxUserChars, pszDomain, ulMaxDomainChars);
771
772 if (!pszUserName || !pszUser || !ulMaxUserChars || !pszDomain ||
773 !ulMaxDomainChars)
775
776 /* FIXME: handle marshaled credentials */
777
778 p = wcschr(pszUserName, '\\');
779 if (p)
780 {
781 if (p - pszUserName > ulMaxDomainChars - 1)
783 if (lstrlenW(p + 1) > ulMaxUserChars - 1)
785 lstrcpyW(pszUser, p + 1);
786 memcpy(pszDomain, pszUserName, (p - pszUserName)*sizeof(WCHAR));
787 pszDomain[p - pszUserName] = '\0';
788
789 return ERROR_SUCCESS;
790 }
791
792 p = wcsrchr(pszUserName, '@');
793 if (p)
794 {
795 if (p + 1 - pszUserName > ulMaxUserChars - 1)
797 if (lstrlenW(p + 1) > ulMaxDomainChars - 1)
799 lstrcpyW(pszDomain, p + 1);
800 memcpy(pszUser, pszUserName, (p - pszUserName)*sizeof(WCHAR));
801 pszUser[p - pszUserName] = '\0';
802
803 return ERROR_SUCCESS;
804 }
805
806 if (lstrlenW(pszUserName) > ulMaxUserChars - 1)
808 lstrcpyW(pszUser, pszUserName);
809 pszDomain[0] = '\0';
810
811 return ERROR_SUCCESS;
812}
813
814/******************************************************************************
815 * CredUIStoreSSOCredA [CREDUI.@]
816 */
818 PCSTR pszPassword, BOOL bPersist)
819{
820 FIXME("(%s, %s, %p, %d)\n", debugstr_a(pszRealm), debugstr_a(pszUsername),
821 pszPassword, bPersist);
822 return ERROR_SUCCESS;
823}
824
825/******************************************************************************
826 * CredUIStoreSSOCredW [CREDUI.@]
827 */
829 PCWSTR pszPassword, BOOL bPersist)
830{
831 FIXME("(%s, %s, %p, %d)\n", debugstr_w(pszRealm), debugstr_w(pszUsername),
832 pszPassword, bPersist);
833 return ERROR_SUCCESS;
834}
835
836/******************************************************************************
837 * CredUIReadSSOCredA [CREDUI.@]
838 */
839DWORD WINAPI CredUIReadSSOCredA(PCSTR pszRealm, PSTR *ppszUsername)
840{
841 FIXME("(%s, %p)\n", debugstr_a(pszRealm), ppszUsername);
842 if (ppszUsername)
843 *ppszUsername = NULL;
844 return ERROR_NOT_FOUND;
845}
846
847/******************************************************************************
848 * CredUIReadSSOCredW [CREDUI.@]
849 */
851{
852 FIXME("(%s, %p)\n", debugstr_w(pszRealm), ppszUsername);
853 if (ppszUsername)
854 *ppszUsername = NULL;
855 return ERROR_NOT_FOUND;
856}
857
858/******************************************************************************
859 * CredUIInitControls [CREDUI.@]
860 */
862{
863 FIXME("() stub\n");
864 return TRUE;
865}
866
867/******************************************************************************
868 * SspiPromptForCredentialsW [CREDUI.@]
869 */
871 DWORD error, PCWSTR package,
874 BOOL *save, DWORD sspi_flags )
875{
876 static const WCHAR basicW[] = {'B','a','s','i','c',0};
877 static const WCHAR ntlmW[] = {'N','T','L','M',0};
878 static const WCHAR negotiateW[] = {'N','e','g','o','t','i','a','t','e',0};
881 DWORD len_username = ARRAY_SIZE(username);
882 DWORD len_password = ARRAY_SIZE(password);
883 DWORD ret, flags;
884 CREDUI_INFOW *cred_info = info;
885 SEC_WINNT_AUTH_IDENTITY_W *id = input_id;
886
887 FIXME( "(%s, %p, %u, %s, %p, %p, %p, %x) stub\n", debugstr_w(target), info,
888 error, debugstr_w(package), input_id, output_id, save, sspi_flags );
889
890 if (!target) return ERROR_INVALID_PARAMETER;
891 if (!package || (wcsicmp( package, basicW ) && wcsicmp( package, ntlmW ) &&
892 wcsicmp( package, negotiateW )))
893 {
894 FIXME( "package %s not supported\n", debugstr_w(package) );
896 }
897
899
900 if (sspi_flags & SSPIPFC_CREDPROV_DO_NOT_SAVE)
902
903 if (!(sspi_flags & SSPIPFC_NO_CHECKBOX))
905
906 if (!id) find_existing_credential( target, username, len_username, password, len_password );
907 else
908 {
909 if (id->User && id->UserLength > 0 && id->UserLength <= CREDUI_MAX_USERNAME_LENGTH)
910 {
911 memcpy( username, id->User, id->UserLength * sizeof(WCHAR) );
912 username[id->UserLength] = 0;
913 }
914 if (id->Password && id->PasswordLength > 0 && id->PasswordLength <= CREDUI_MAX_PASSWORD_LENGTH)
915 {
916 memcpy( password, id->Password, id->PasswordLength * sizeof(WCHAR) );
917 password[id->PasswordLength] = 0;
918 }
919 }
920
922 len_username, password, len_password, save, flags )))
923 {
924 DWORD size = sizeof(*id), len_domain = 0;
925 WCHAR *ptr, *user = username, *domain = NULL;
926
927 if ((ptr = wcschr( username, '\\' )))
928 {
929 user = ptr + 1;
930 len_username = lstrlenW( user );
931 if (!wcsicmp( package, ntlmW ) || !wcsicmp( package, negotiateW ))
932 {
934 len_domain = ptr - username;
935 }
936 *ptr = 0;
937 }
938 else len_username = lstrlenW( username );
939 len_password = lstrlenW( password );
940
941 size += (len_username + 1) * sizeof(WCHAR);
942 size += (len_domain + 1) * sizeof(WCHAR);
943 size += (len_password + 1) * sizeof(WCHAR);
944 if (!(id = HeapAlloc( GetProcessHeap(), 0, size ))) return ERROR_OUTOFMEMORY;
945 ptr = (WCHAR *)(id + 1);
946
947 memcpy( ptr, user, (len_username + 1) * sizeof(WCHAR) );
948 id->User = ptr;
949 id->UserLength = len_username;
950 ptr += len_username + 1;
951 if (len_domain)
952 {
953 memcpy( ptr, domain, (len_domain + 1) * sizeof(WCHAR) );
954 id->Domain = ptr;
955 id->DomainLength = len_domain;
956 ptr += len_domain + 1;
957 }
958 else
959 {
960 id->Domain = NULL;
961 id->DomainLength = 0;
962 }
963 memcpy( ptr, password, (len_password + 1) * sizeof(WCHAR) );
964 id->Password = ptr;
965 id->PasswordLength = len_password;
966 id->Flags = 0;
967
968 *output_id = id;
969 }
970
971 return ret;
972}
973
974/******************************************************************************
975 * CredUIPromptForWindowsCredentialsW [CREDUI.@]
976 */
978 const void *in_buf, ULONG in_buf_size, void **out_buf,
979 ULONG *out_buf_size, BOOL *save, DWORD flags )
980{
981 FIXME( "(%p, %u, %p, %p, %u, %p, %p, %p, %08x) stub\n", info, error, package, in_buf, in_buf_size,
982 out_buf, out_buf_size, save, flags );
984}
985
986/******************************************************************************
987 * CredPackAuthenticationBufferW [CREDUI.@]
988 */
990 DWORD *size )
991{
992 FIXME( "(%08x, %s, %p, %p, %p) stub\n", flags, debugstr_w(username), password, buf, size );
994}
995
996/******************************************************************************
997 * CredUnPackAuthenticationBufferW [CREDUI.@]
998 */
1000 DWORD *len_username, WCHAR *domain, DWORD *len_domain,
1001 WCHAR *password, DWORD *len_password )
1002{
1003 FIXME( "(%08x, %p, %u, %p, %p, %p, %p, %p, %p) stub\n", flags, buf, size, username, len_username,
1004 domain, len_domain, password, len_password );
1006}
Type
Definition: Type.h:7
static DWORD const fdwReason
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define IDC_SAVE
Definition: resource.h:16
void user(int argc, const char *argv[])
Definition: cmds.c:1350
#define ARRAY_SIZE(A)
Definition: main.h:20
#define IDC_USERNAME
Definition: resource.h:82
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
Definition: list.h:37
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:870
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1268
BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
Definition: commctrl.c:1397
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1503
DWORD WINAPI CredUIStoreSSOCredA(PCSTR pszRealm, PCSTR pszUsername, PCSTR pszPassword, BOOL bPersist)
Definition: credui_main.c:817
BOOL WINAPI CredUnPackAuthenticationBufferW(DWORD flags, void *buf, DWORD size, WCHAR *username, DWORD *len_username, WCHAR *domain, DWORD *len_domain, WCHAR *password, DWORD *len_password)
Definition: credui_main.c:999
#define TOOLID_CAPSLOCKON
Definition: credui_main.c:43
DWORD WINAPI CredUIReadSSOCredW(PCWSTR pszRealm, PWSTR *ppszUsername)
Definition: credui_main.c:850
static void CredDialogCreateBalloonTip(HWND hwndDlg, struct cred_dialog_params *params)
Definition: credui_main.c:205
#define TOOLID_INCORRECTPASSWORD
Definition: credui_main.c:42
static void CredDialogFillUsernameCombo(HWND hwndUsername, const struct cred_dialog_params *params)
Definition: credui_main.c:152
static void CredDialogCommandOk(HWND hwndDlg, struct cred_dialog_params *params)
Definition: credui_main.c:445
static BOOL find_existing_credential(const WCHAR *target, WCHAR *username, ULONG len_username, WCHAR *password, ULONG len_password)
Definition: credui_main.c:565
DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo, PCWSTR pszTargetName, PCtxtHandle Reserved, DWORD dwAuthError, PWSTR pszUsername, ULONG ulUsernameMaxChars, PWSTR pszPassword, ULONG ulPasswordMaxChars, PBOOL pfSave, DWORD dwFlags)
Definition: credui_main.c:601
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: credui_main.c:70
static LRESULT CALLBACK CredDialogPasswordSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
Definition: credui_main.c:357
static CRITICAL_SECTION_DEBUG critsect_debug
Definition: credui_main.c:61
DWORD WINAPI CredUIReadSSOCredA(PCSTR pszRealm, PSTR *ppszUsername)
Definition: credui_main.c:839
DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR pszTargetName, BOOL bConfirm)
Definition: credui_main.c:721
static struct list pending_credentials_list
Definition: credui_main.c:58
static void CredDialogShowIncorrectPasswordBalloon(HWND hwndDlg, struct cred_dialog_params *params)
Definition: credui_main.c:247
BOOL WINAPI CredPackAuthenticationBufferW(DWORD flags, WCHAR *username, WCHAR *password, BYTE *buf, DWORD *size)
Definition: credui_main.c:989
#define ID_CAPSLOCKPOP
Definition: credui_main.c:45
static void CredDialogShowCapsLockBalloon(HWND hwndDlg, struct cred_dialog_params *params)
Definition: credui_main.c:291
static BOOL CredDialogInit(HWND hwndDlg, struct cred_dialog_params *params)
Definition: credui_main.c:380
static BOOL CredDialogCapsLockOn(void)
Definition: credui_main.c:352
static DWORD save_credentials(PCWSTR pszTargetName, PCWSTR pszUsername, PCWSTR pszPassword, BOOL generic)
Definition: credui_main.c:107
static HINSTANCE hinstCredUI
Definition: credui_main.c:56
static void CredDialogHideBalloonTip(HWND hwndDlg, struct cred_dialog_params *params)
Definition: credui_main.c:333
DWORD WINAPI CredUIParseUserNameW(PCWSTR pszUserName, PWSTR pszUser, ULONG ulMaxUserChars, PWSTR pszDomain, ULONG ulMaxDomainChars)
Definition: credui_main.c:763
static CRITICAL_SECTION csPendingCredentials
Definition: credui_main.c:60
static INT_PTR CALLBACK CredDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: credui_main.c:490
DWORD WINAPI CredUIStoreSSOCredW(PCWSTR pszRealm, PCWSTR pszUsername, PCWSTR pszPassword, BOOL bPersist)
Definition: credui_main.c:828
ULONG SEC_ENTRY SspiPromptForCredentialsW(PCWSTR target, void *info, DWORD error, PCWSTR package, PSEC_WINNT_AUTH_IDENTITY_OPAQUE input_id, PSEC_WINNT_AUTH_IDENTITY_OPAQUE *output_id, BOOL *save, DWORD sspi_flags)
Definition: credui_main.c:870
DWORD WINAPI CredUIPromptForWindowsCredentialsW(CREDUI_INFOW *info, DWORD error, ULONG *package, const void *in_buf, ULONG in_buf_size, void **out_buf, ULONG *out_buf_size, BOOL *save, DWORD flags)
Definition: credui_main.c:977
BOOL WINAPI CredUIInitControls(void)
Definition: credui_main.c:861
#define IDS_INCORRECTPASSWORD
#define IDS_CAPSLOCKONTITLE
#define IDD_CREDDIALOG
#define IDB_BANNER
#define IDS_MESSAGEFORMAT
#define IDS_CAPSLOCKON
#define IDS_INCORRECTPASSWORDTITLE
#define IDS_TITLEFORMAT
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDC_MESSAGE
Definition: resource.h:31
#define IDC_PASSWORD
Definition: resource.h:20
VOID WINAPI CredFree(PVOID Buffer)
Definition: cred.c:1395
BOOL WINAPI CredEnumerateW(LPCWSTR Filter, DWORD Flags, DWORD *Count, PCREDENTIALW **Credentials)
Definition: cred.c:1289
BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
Definition: cred.c:1809
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define wcsrchr
Definition: compat.h:16
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define lstrcpyW
Definition: compat.h:749
#define wcsicmp
Definition: compat.h:15
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4243
#define SEC_ENTRY
Definition: stubs.c:6
#define swprintf
Definition: precomp.h:40
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLsizeiptr size
Definition: glext.h:5919
GLenum const GLfloat * params
Definition: glext.h:5645
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLuint64EXT * result
Definition: glext.h:11304
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
GLuint id
Definition: glext.h:5910
GLenum target
Definition: glext.h:7315
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
static IN DWORD IN LPVOID lpvReserved
#define error(str)
Definition: mkdosfs.c:1605
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
static HBITMAP
Definition: button.c:44
static WCHAR password[]
Definition: url.c:33
static WCHAR username[]
Definition: url.c:32
#define min(a, b)
Definition: monoChain.cc:55
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
@ generic
Definition: optimize.h:97
#define WS_POPUP
Definition: pedump.c:616
static char title[]
Definition: ps.c:92
_In_ SUBCLASSPROC _In_ UINT_PTR uIdSubclass
Definition: commctrl.h:5062
#define TTDT_AUTOPOP
Definition: commctrl.h:1776
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1707
#define CBEIF_TEXT
Definition: commctrl.h:3791
#define TTM_GETDELAYTIME
Definition: commctrl.h:1821
#define TTM_SETTITLEW
Definition: commctrl.h:1833
#define TTM_TRACKPOSITION
Definition: commctrl.h:1818
#define TTM_ADDTOOLW
Definition: commctrl.h:1792
#define CBEM_INSERTITEMW
Definition: commctrl.h:3846
_In_ SUBCLASSPROC _In_ UINT_PTR _In_ DWORD_PTR dwRefData
Definition: commctrl.h:5063
#define TTS_NOPREFIX
Definition: commctrl.h:1758
#define TTI_ERROR
Definition: commctrl.h:1782
#define TTF_TRACK
Definition: commctrl.h:1768
#define TTM_TRACKACTIVATE
Definition: commctrl.h:1817
#define TTI_WARNING
Definition: commctrl.h:1781
#define TTS_BALLOON
Definition: commctrl.h:1761
#define SSPIPFC_CREDPROV_DO_NOT_SAVE
Definition: sspi.h:93
#define SSPIPFC_NO_CHECKBOX
Definition: sspi.h:94
static const WCHAR basicW[]
static const WCHAR negotiateW[]
static const WCHAR ntlmW[]
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
LPWSTR TargetName
Definition: wincred.h:86
LPBYTE CredentialBlob
Definition: wincred.h:90
DWORD AttributeCount
Definition: wincred.h:92
PCREDENTIAL_ATTRIBUTEW Attributes
Definition: wincred.h:93
DWORD Flags
Definition: wincred.h:84
LPWSTR UserName
Definition: wincred.h:95
DWORD CredentialBlobSize
Definition: wincred.h:89
DWORD Type
Definition: wincred.h:85
DWORD Persist
Definition: wincred.h:91
LPWSTR TargetAlias
Definition: wincred.h:94
LPWSTR Comment
Definition: wincred.h:87
HWND hwndParent
Definition: wincred.h:144
PCWSTR pszMessageText
Definition: wincred.h:145
PCWSTR pszCaptionText
Definition: wincred.h:146
HBITMAP hbmBanner
Definition: wincred.h:147
LIST_ENTRY ProcessLocksList
Definition: winbase.h:908
Definition: cookie.c:42
Definition: format.c:58
Definition: tftpd.h:60
struct list entry
Definition: credui_main.c:49
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
HINSTANCE hinst
Definition: commctrl.h:1745
UINT_PTR uId
Definition: commctrl.h:1743
LPARAM lParam
Definition: commctrl.h:1747
LPWSTR lpszText
Definition: commctrl.h:1746
void * lpReserved
Definition: commctrl.h:1748
#define LIST_INIT(head)
Definition: queue.h:197
#define DWORD_PTR
Definition: treelist.c:76
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
char * PSTR
Definition: typedefs.h:51
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
const char * PCSTR
Definition: typedefs.h:52
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
int ret
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
BOOL WINAPI LockSetForegroundWindow(UINT uLockCode)
Definition: window.c:1627
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
#define SecureZeroMemory
Definition: winbase.h:1744
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define CREDUI_FLAGS_EXPECT_CONFIRMATION
Definition: wincred.h:236
#define CREDUI_FLAGS_ALWAYS_SHOW_UI
Definition: wincred.h:229
#define CREDUI_FLAGS_GENERIC_CREDENTIALS
Definition: wincred.h:237
#define CRED_PERSIST_ENTERPRISE
Definition: wincred.h:216
#define CREDUI_FLAGS_INCORRECT_PASSWORD
Definition: wincred.h:223
#define CREDUI_FLAGS_PERSIST
Definition: wincred.h:234
#define CREDUI_FLAGS_DO_NOT_PERSIST
Definition: wincred.h:224
#define CRED_TYPE_DOMAIN_PASSWORD
Definition: wincred.h:205
#define CRED_TYPE_GENERIC
Definition: wincred.h:204
#define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX
Definition: wincred.h:228
#define CREDUI_MAX_USERNAME_LENGTH
Definition: wincred.h:193
#define CREDUI_MAX_PASSWORD_LENGTH
Definition: wincred.h:194
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
BOOL * PBOOL
Definition: windef.h:161
#define WINAPI
Definition: msvc.h:6
#define ERROR_NO_SUCH_PACKAGE
Definition: winerror.h:845
#define ERROR_CANCELLED
Definition: winerror.h:726
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
#define ERROR_NOT_FOUND
Definition: winerror.h:690
HWND WINAPI GetFocus(void)
Definition: window.c:1875
#define SW_HIDE
Definition: winuser.h:779
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define IMAGE_BITMAP
Definition: winuser.h:211
#define DWLP_USER
Definition: winuser.h:883
#define GetWindowLongPtrW
Definition: winuser.h:4840
#define EN_KILLFOCUS
Definition: winuser.h:2036
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define HWND_TOPMOST
Definition: winuser.h:1219
#define IDCANCEL
Definition: winuser.h:842
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define EN_SETFOCUS
Definition: winuser.h:2038
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define VK_CAPITAL
Definition: winuser.h:2217
#define SWP_NOMOVE
Definition: winuser.h:1255
#define WM_COMMAND
Definition: winuser.h:1751
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define SWP_NOSIZE
Definition: winuser.h:1256
#define WM_INITDIALOG
Definition: winuser.h:1750
#define STM_SETIMAGE
Definition: winuser.h:2104
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:841
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define WM_TIMER
Definition: winuser.h:1753
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
int WINAPI GetWindowTextLengthW(_In_ HWND)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
#define CW_USEDEFAULT
Definition: winuser.h:225
HWND WINAPI GetParent(_In_ HWND)
#define BN_CLICKED
Definition: winuser.h:1936
#define WM_DESTROY
Definition: winuser.h:1620
#define WM_KEYDOWN
Definition: winuser.h:1726
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SetWindowLongPtrW
Definition: winuser.h:5366
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
SHORT WINAPI GetKeyState(_In_ int)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define EN_CHANGE
Definition: winuser.h:2033
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193