ReactOS 0.4.17-dev-1196-gb6224c3
dialogs.c
Go to the documentation of this file.
1#ifdef __REACTOS__
2#include "precomp.h"
3#else
4/*
5 * Wininet
6 *
7 * Copyright 2003 Mike McCormack for CodeWeavers Inc.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include "ws2tcpip.h"
25
26#include <stdarg.h>
27
28#include "windef.h"
29#include "winbase.h"
30#include "winuser.h"
31#include "winreg.h"
32#include "wininet.h"
33#include "winnetwk.h"
34#include "wine/debug.h"
35#include "winerror.h"
36#define NO_SHLWAPI_STREAM
37#include "shlwapi.h"
38#include "cryptuiapi.h"
39
40#include "internet.h"
41#include "resource.h"
42#endif /* defined(__REACTOS__) */
43
44#define MAX_STRING_LEN 1024
45
47
49{
55};
56
57/***********************************************************************
58 * WININET_GetAuthRealm
59 *
60 * Determine the name of the (basic) Authentication realm
61 */
63{
64 LPWSTR p, q;
66
67 if (proxy)
69 else
71
72 /* extract the Realm from the response and show it */
73 index = 0;
74 if( !HttpQueryInfoW( hRequest, query, szBuf, &sz, &index) )
75 return FALSE;
76
77 /*
78 * FIXME: maybe we should check that we're
79 * dealing with 'Basic' Authentication
80 */
81 p = wcschr( szBuf, ' ' );
82 if( !p || wcsncmp( p+1, L"realm=", lstrlenW(L"realm=") ) )
83 {
84 ERR("response wrong? (%s)\n", debugstr_w(szBuf));
85 return FALSE;
86 }
87
88 /* remove quotes */
89 p += 7;
90 if( *p == '"' )
91 {
92 p++;
93 q = wcsrchr( p, '"' );
94 if( q )
95 *q = 0;
96 }
97 lstrcpyW( szBuf, p );
98
99 return TRUE;
100}
101
102/* These two are not defined in the public headers */
105
106/***********************************************************************
107 * WININET_GetSetPassword
108 */
109static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
110 LPCWSTR szRealm, BOOL bSet )
111{
112 WCHAR szResource[0x80], szUserPass[0x40];
113 LPWSTR p;
114 HWND hUserItem, hPassItem;
115 DWORD r, dwMagic = 19;
116 UINT r_len, u_len;
117 WORD sz;
118
119 hUserItem = GetDlgItem( hdlg, IDC_USERNAME );
120 hPassItem = GetDlgItem( hdlg, IDC_PASSWORD );
121
122 /* now try fetch the username and password */
123 lstrcpyW( szResource, szServer);
124 lstrcatW( szResource, L"/");
125 lstrcatW( szResource, szRealm);
126
127 /*
128 * WNetCachePassword is only concerned with the length
129 * of the data stored (which we tell it) and it does
130 * not use strlen() internally so we can add WCHAR data
131 * instead of ASCII data and get it back the same way.
132 */
133 if( bSet )
134 {
135 szUserPass[0] = 0;
136 GetWindowTextW( hUserItem, szUserPass, ARRAY_SIZE( szUserPass ) - 1 );
137 lstrcatW(szUserPass, L":");
138 u_len = lstrlenW( szUserPass );
139 GetWindowTextW( hPassItem, szUserPass+u_len, ARRAY_SIZE( szUserPass ) - u_len );
140
141 r_len = (lstrlenW( szResource ) + 1)*sizeof(WCHAR);
142 u_len = (lstrlenW( szUserPass ) + 1)*sizeof(WCHAR);
143 r = WNetCachePassword( (CHAR*)szResource, r_len,
144 (CHAR*)szUserPass, u_len, dwMagic, 0 );
145
146 return ( r == WN_SUCCESS );
147 }
148
149 sz = sizeof szUserPass;
150 r_len = (lstrlenW( szResource ) + 1)*sizeof(WCHAR);
151 r = WNetGetCachedPassword( (CHAR*)szResource, r_len,
152 (CHAR*)szUserPass, &sz, dwMagic );
153 if( r != WN_SUCCESS )
154 return FALSE;
155
156 p = wcschr( szUserPass, ':' );
157 if( p )
158 {
160 HWND hwnd;
161
164
165 *p = 0;
166 SetWindowTextW( hUserItem, szUserPass );
167
168 if (!params->req->clear_auth)
169 {
170 SetWindowTextW( hPassItem, p+1 );
171
173 if (hwnd)
175 }
176 else
177 WININET_GetSetPassword( hdlg, szServer, szRealm, TRUE );
178 }
179
180 return TRUE;
181}
182
183/***********************************************************************
184 * WININET_SetAuthorization
185 */
188{
189 http_session_t *session = request->session;
190 LPWSTR p, q;
191
192 p = wcsdup(username);
193 if( !p )
194 return FALSE;
195
196 q = wcsdup(password);
197 if( !q )
198 {
199 free(p);
200 return FALSE;
201 }
202
203 if (proxy)
204 {
205 appinfo_t *hIC = session->appInfo;
206
207 free(hIC->proxyUsername);
208 hIC->proxyUsername = p;
209
210 free(hIC->proxyPassword);
211 hIC->proxyPassword = q;
212 }
213 else
214 {
215 free(session->userName);
216 session->userName = p;
217
218 free(session->password);
219 session->password = q;
220 }
221
222 return TRUE;
223}
224
225/***********************************************************************
226 * WININET_ProxyPasswordDialog
227 */
229 HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
230{
231 HWND hitem;
233 WCHAR szRealm[0x80];
234
235 if( uMsg == WM_INITDIALOG )
236 {
237 TRACE("WM_INITDIALOG (%08Ix)\n", lParam);
238
239 /* save the parameter list */
242
243 /* extract the Realm from the proxy response and show it */
244 if( WININET_GetAuthRealm( params->req->hdr.hInternet,
245 szRealm, ARRAY_SIZE( szRealm ), TRUE ) )
246 {
247 hitem = GetDlgItem( hdlg, IDC_REALM );
248 SetWindowTextW( hitem, szRealm );
249 }
250
251 hitem = GetDlgItem( hdlg, IDC_PROXY );
252 SetWindowTextW( hitem, params->req->session->appInfo->proxy );
253
254 WININET_GetSetPassword( hdlg, params->req->session->appInfo->proxy, szRealm, FALSE );
255
256 return TRUE;
257 }
258
261
262 switch( uMsg )
263 {
264 case WM_COMMAND:
265 if( wParam == IDOK )
266 {
267 WCHAR username[0x20], password[0x20];
268
269 username[0] = 0;
270 hitem = GetDlgItem( hdlg, IDC_USERNAME );
271 if( hitem )
273
274 password[0] = 0;
275 hitem = GetDlgItem( hdlg, IDC_PASSWORD );
276 if( hitem )
278
279 hitem = GetDlgItem( hdlg, IDC_SAVEPASSWORD );
280 if( hitem &&
281 SendMessageW( hitem, BM_GETSTATE, 0, 0 ) &&
282 WININET_GetAuthRealm( params->req->hdr.hInternet,
283 szRealm, ARRAY_SIZE( szRealm ), TRUE) )
284 WININET_GetSetPassword( hdlg, params->req->session->appInfo->proxy, szRealm, TRUE );
286
287 params->req->clear_auth = TRUE;
288
290 return TRUE;
291 }
292 if( wParam == IDCANCEL )
293 {
294 EndDialog( hdlg, 0 );
295 return TRUE;
296 }
297 break;
298 }
299 return FALSE;
300}
301
302/***********************************************************************
303 * WININET_PasswordDialog
304 */
306 HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
307{
308 HWND hitem;
310 WCHAR szRealm[0x80];
311
312 if( uMsg == WM_INITDIALOG )
313 {
314 TRACE("WM_INITDIALOG (%08Ix)\n", lParam);
315
316 /* save the parameter list */
319
320 /* extract the Realm from the response and show it */
321 if( WININET_GetAuthRealm( params->req->hdr.hInternet,
322 szRealm, ARRAY_SIZE( szRealm ), FALSE ) )
323 {
324 hitem = GetDlgItem( hdlg, IDC_REALM );
325 SetWindowTextW( hitem, szRealm );
326 }
327
328 hitem = GetDlgItem( hdlg, IDC_SERVER );
329 SetWindowTextW( hitem, params->req->session->hostName );
330
331 WININET_GetSetPassword( hdlg, params->req->session->hostName, szRealm, FALSE );
332
333 return TRUE;
334 }
335
338
339 switch( uMsg )
340 {
341 case WM_COMMAND:
342 if( wParam == IDOK )
343 {
344 WCHAR username[0x20], password[0x20];
345
346 username[0] = 0;
347 hitem = GetDlgItem( hdlg, IDC_USERNAME );
348 if( hitem )
350
351 password[0] = 0;
352 hitem = GetDlgItem( hdlg, IDC_PASSWORD );
353 if( hitem )
355
356 hitem = GetDlgItem( hdlg, IDC_SAVEPASSWORD );
357 if( hitem &&
358 SendMessageW( hitem, BM_GETSTATE, 0, 0 ) &&
359 WININET_GetAuthRealm( params->req->hdr.hInternet,
360 szRealm, ARRAY_SIZE( szRealm ), FALSE ))
361 {
362 WININET_GetSetPassword( hdlg, params->req->session->hostName, szRealm, TRUE );
363 }
365 params->req->clear_auth = TRUE;
366
368 return TRUE;
369 }
370 if( wParam == IDCANCEL )
371 {
372 EndDialog( hdlg, 0 );
373 return TRUE;
374 }
375 break;
376 }
377 return FALSE;
378}
379
380/***********************************************************************
381 * WININET_InvalidCertificateDialog
382 */
384 HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
385{
387 HWND hitem;
388 WCHAR buf[1024];
389
390 if( uMsg == WM_INITDIALOG )
391 {
392 TRACE("WM_INITDIALOG (%08Ix)\n", lParam);
393
394 /* save the parameter list */
397
398 switch( params->dwError )
399 {
402 break;
405 break;
408 break;
410 /* FIXME: We should fetch information about the
411 * certificate here and show all the relevant errors.
412 */
414 break;
415 default:
416 FIXME( "No message for error %ld\n", params->dwError );
417 buf[0] = '\0';
418 }
419
420 hitem = GetDlgItem( hdlg, IDC_CERT_ERROR );
421 SetWindowTextW( hitem, buf );
422
423 return TRUE;
424 }
425
428
429 switch( uMsg )
430 {
431 case WM_COMMAND:
432 if( wParam == IDOK )
433 {
435 {
436 http_request_t *req = params->req;
437 DWORD flags, size = sizeof(flags);
438
440 switch( params->dwError )
441 {
444 break;
447 break;
450 break;
453 break;
463 break;
464 }
465 /* FIXME: Use helper function */
470 }
471
472 EndDialog( hdlg, ERROR_SUCCESS );
473 return TRUE;
474 }
475 if( wParam == IDCANCEL )
476 {
477 TRACE("Pressed cancel.\n");
478
479 EndDialog( hdlg, ERROR_CANCELLED );
480 return TRUE;
481 }
482 break;
483 }
484
485 return FALSE;
486}
487
488/***********************************************************************
489 * InternetErrorDlg
490 */
493{
497
498 TRACE("%p %p %ld %08lx %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
499
502
503 if(hRequest) {
505 if(!req)
507 if(req->hdr.htype != WH_HHTTPREQ)
508 return ERROR_SUCCESS; /* Yes, that was tested */
509 }
510
511 params.req = req;
512 params.hWnd = hWnd;
513 params.dwError = dwError;
514 params.dwFlags = dwFlags;
515 params.lppvData = lppvData;
516
517 switch( dwError )
518 {
519 case ERROR_SUCCESS:
522 break;
523 if(!req)
525
526 switch(req->status_code) {
530 break;
534 break;
535 case HTTP_STATUS_OK:
537 break;
538 default:
539 WARN("unhandled status %lu\n", req->status_code);
540 }
541 break;
542 }
543
545 if(!req)
547 /* fall through */
556 break;
557 }
558
560 FIXME("%08lx contains unsupported flags.\n", dwFlags);
561
564 break;
565
569 break;
570 }
571 FIXME("Need to display dialog for error %ld\n", dwError);
573 break;
574
576 if(!req)
578 /* fall through */
585 FIXME("Need to display dialog for error %ld\n", dwError);
587 break;
588
593 break;
594 }
595 FIXME("Need to display dialog for error %ld\n", dwError);
597 break;
598
602 FIXME("Need to display dialog for error %ld\n", dwError);
604 break;
605
606 default:
609 break;
610 }
611
612 if(req)
614 return res;
615}
616
617/***********************************************************************
618 * InternetShowSecurityInfoByURLA (@)
619 */
621{
622 FIXME("stub: %s %p\n", url, window);
623 return FALSE;
624}
625
626/***********************************************************************
627 * InternetShowSecurityInfoByURLW (@)
628 */
630{
631 FIXME("stub: %s %p\n", debugstr_w(url), window);
632 return FALSE;
633}
634
635/***********************************************************************
636 * ParseX509EncodedCertificateForListBoxEntry (@)
637 */
639{
640 FIXME("stub: %p %ld %s %p\n", cert, len, debugstr_a(szlistbox), listbox);
642}
643
644/***********************************************************************
645 * ShowX509EncodedCertificate (@)
646 */
648{
650 cert, len);
651 DWORD ret;
652
653 if (certContext)
654 {
656
657 memset(&view, 0, sizeof(view));
658 view.hwndParent = parent;
659 view.pCertContext = certContext;
662 else
663 ret = GetLastError();
664 CertFreeCertificateContext(certContext);
665 }
666 else
667 ret = GetLastError();
668 return ret;
669}
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define index(s, c)
Definition: various.h:29
#define ARRAY_SIZE(A)
Definition: main.h:20
#define IDC_USERNAME
Definition: resource.h:82
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
static UCHAR password[]
Definition: bcrypt.c:494
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define free
Definition: debug_ros.c:5
#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_PASSWORD
Definition: resource.h:20
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
Definition: cert.c:369
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
Definition: cert.c:314
BOOL WINAPI CryptUIDlgViewCertificateW(PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo, BOOL *pfPropertiesChanged)
Definition: main.c:4370
#define wcschr
Definition: compat.h:17
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define wcsrchr
Definition: compat.h:16
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
_ACRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t)
Definition: wcs.c:523
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
DWORD WINAPI ParseX509EncodedCertificateForListBoxEntry(LPBYTE cert, DWORD len, LPSTR szlistbox, LPDWORD listbox)
Definition: dialogs.c:638
BOOL WINAPI InternetShowSecurityInfoByURLA(LPCSTR url, HWND window)
Definition: dialogs.c:620
static BOOL WININET_GetSetPassword(HWND hdlg, LPCWSTR szServer, LPCWSTR szRealm, BOOL bSet)
Definition: dialogs.c:109
static BOOL WININET_SetAuthorization(http_request_t *request, LPWSTR username, LPWSTR password, BOOL proxy)
Definition: dialogs.c:186
DWORD WINAPI WNetGetCachedPassword(LPSTR, WORD, LPSTR, LPWORD, BYTE)
Definition: pwcache.c:180
static BOOL WININET_GetAuthRealm(HINTERNET hRequest, LPWSTR szBuf, DWORD sz, BOOL proxy)
Definition: dialogs.c:62
static INT_PTR WINAPI WININET_InvalidCertificateDialog(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:383
DWORD WINAPI WNetCachePassword(LPSTR, WORD, LPSTR, WORD, BYTE, WORD)
Definition: pwcache.c:85
BOOL WINAPI InternetShowSecurityInfoByURLW(LPCWSTR url, HWND window)
Definition: dialogs.c:629
DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest, DWORD dwError, DWORD dwFlags, LPVOID *lppvData)
Definition: dialogs.c:491
static INT_PTR WINAPI WININET_PasswordDialog(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:305
static INT_PTR WINAPI WININET_ProxyPasswordDialog(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:228
DWORD WINAPI ShowX509EncodedCertificate(HWND parent, LPBYTE cert, DWORD len)
Definition: dialogs.c:647
BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex)
Definition: http.c:3967
BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength)
Definition: internet.c:3253
BOOL WININET_Release(object_header_t *info)
Definition: internet.c:244
object_header_t * get_handle_object(HINTERNET hinternet)
Definition: internet.c:209
HMODULE WININET_hModule
Definition: internet.c:71
#define IDS_CERT_CN_INVALID
Definition: resource.h:41
#define IDS_CERT_DATE_INVALID
Definition: resource.h:40
#define IDC_CERT_ERROR
Definition: resource.h:36
#define IDD_INVCERTDLG
Definition: resource.h:26
#define IDS_CERT_ERRORS
Definition: resource.h:42
#define IDD_AUTHDLG
Definition: resource.h:27
#define IDS_CERT_CA_INVALID
Definition: resource.h:39
#define IDC_SERVER
Definition: resource.h:35
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
r parent
Definition: btrfs.c:3010
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
int proxy
Definition: main.c:67
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLuint res
Definition: glext.h:9613
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
GLbitfield flags
Definition: glext.h:7161
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned int UINT
Definition: sysinfo.c:13
#define _SECURITY_FLAG_CERT_REV_FAILED
Definition: internet.h:440
#define _SECURITY_FLAG_CERT_INVALID_CN
Definition: internet.h:442
BOOL is_valid_netconn(netconn_t *)
@ WH_HHTTPREQ
Definition: internet.h:206
#define _SECURITY_FLAG_CERT_INVALID_DATE
Definition: internet.h:443
#define _SECURITY_FLAG_CERT_INVALID_CA
Definition: internet.h:441
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
LONG_PTR LPARAM
Definition: minwindef.h:175
UINT_PTR WPARAM
Definition: minwindef.h:174
static const WCHAR url[]
Definition: encode.c:1384
static BYTE cert[]
Definition: msg.c:1374
static IHTMLWindow2 * window
Definition: events.c:77
static WCHAR username[]
Definition: url.c:32
#define IDC_REALM
Definition: mprres.h:29
#define IDC_PROXY
Definition: mprres.h:28
#define IDC_SAVEPASSWORD
Definition: mprres.h:32
#define IDD_PROXYDLG
Definition: mprres.h:26
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
short WCHAR
Definition: pedump.c:58
char CHAR
Definition: pedump.c:57
#define BM_GETSTATE
Definition: winuser.h:1949
#define GetWindowLongPtrW
Definition: winuser.h:4983
#define IDCANCEL
Definition: winuser.h:842
#define WM_COMMAND
Definition: winuser.h:1768
#define WM_INITDIALOG
Definition: winuser.h:1767
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:841
#define BM_SETCHECK
Definition: winuser.h:1950
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SetWindowLongPtrW
Definition: winuser.h:5512
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
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 LoadStringW
Definition: utils.h:64
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
http_request_t * req
Definition: dialogs.c:50
WH_TYPE htype
Definition: internet.h:240
HINTERNET hInternet
Definition: internet.h:242
LPWSTR proxyPassword
Definition: internet.h:268
LPWSTR proxyUsername
Definition: internet.h:267
DWORD security_flags
Definition: internet.h:320
object_header_t hdr
Definition: internet.h:313
netconn_t * netconn
Definition: internet.h:319
BOOL clear_auth
Definition: internet.h:326
DWORD status_code
Definition: internet.h:322
DWORD security_flags
Definition: internet.h:80
Definition: tftpd.h:86
#define GWLP_USERDATA
Definition: treelist.c:63
const char * LPCSTR
Definition: typedefs.h:52
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * LPCWSTR
Definition: typedefs.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
uint16_t * LPWSTR
Definition: typedefs.h:56
uint16_t * LPWORD
Definition: typedefs.h:56
uint32_t * LPDWORD
Definition: typedefs.h:59
char * LPSTR
Definition: typedefs.h:51
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1382
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define X509_ASN_ENCODING
Definition: wincrypt.h:2501
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WINAPI
Definition: msvc.h:6
#define ERROR_CANCELLED
Definition: winerror.h:1055
#define HTTP_STATUS_OK
Definition: winhttp.h:301
#define HTTP_STATUS_PROXY_AUTH_REQ
Definition: winhttp.h:324
#define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID
Definition: winhttp.h:344
#define SECURITY_FLAG_SECURE
Definition: winhttp.h:347
#define HTTP_STATUS_DENIED
Definition: winhttp.h:318
#define SECURITY_FLAG_IGNORE_UNKNOWN_CA
Definition: winhttp.h:343
#define SECURITY_FLAG_IGNORE_CERT_CN_INVALID
Definition: winhttp.h:345
#define INTERNET_OPTION_SECURITY_FLAGS
Definition: wininet.h:725
#define ERROR_INTERNET_SEC_CERT_CN_INVALID
Definition: wininet.h:2026
#define HTTP_QUERY_PROXY_AUTHENTICATE
Definition: wininet.h:1564
#define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
Definition: wininet.h:2027
#define FLAGS_ERROR_UI_FILTER_FOR_ERRORS
Definition: wininet.h:1906
#define ERROR_INTERNET_INSERT_CDROM
Definition: wininet.h:2040
#define ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT
Definition: wininet.h:2076
#define ERROR_INTERNET_INVALID_CA
Definition: wininet.h:2033
#define ERROR_INTERNET_INCORRECT_PASSWORD
Definition: wininet.h:2003
#define ERROR_INTERNET_SEC_CERT_DATE_INVALID
Definition: wininet.h:2025
#define ERROR_INTERNET_CHG_POST_IS_NON_SECURE
Definition: wininet.h:2030
#define ERROR_INTERNET_FORCE_RETRY
Definition: wininet.h:2021
#define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED
Definition: wininet.h:2032
#define ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
Definition: wininet.h:2066
#define FLAGS_ERROR_UI_FLAGS_NO_UI
Definition: wininet.h:1909
#define ERROR_HTTP_COOKIE_DECLINED
Definition: wininet.h:2067
#define ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION
Definition: wininet.h:2068
#define ERROR_INTERNET_MIXED_SECURITY
Definition: wininet.h:2029
#define ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE
Definition: wininet.h:2045
#define SECURITY_FLAG_IGNORE_REVOCATION
Definition: wininet.h:829
#define ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR
Definition: wininet.h:2039
#define ERROR_INTERNET_POST_IS_NON_SECURE
Definition: wininet.h:2031
#define HTTP_QUERY_WWW_AUTHENTICATE
Definition: wininet.h:1563
#define ERROR_INTERNET_SEC_CERT_REV_FAILED
Definition: wininet.h:2044
#define ERROR_INTERNET_SEC_CERT_ERRORS
Definition: wininet.h:2042
#define ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT
Definition: wininet.h:2075
#define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
Definition: wininet.h:2028
#define FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS
Definition: wininet.h:1907
#define WN_SUCCESS
Definition: winnetwk.h:111
unsigned char BYTE
Definition: xxhash.c:193