ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
14 participants
457 discussions
Start a n
N
ew thread
[akhaldi] 70014: [CREDUI_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:20:50 2015 New Revision: 70014 URL:
http://svn.reactos.org/svn/reactos?rev=70014&view=rev
Log: [CREDUI_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/credui/credui.c Modified: trunk/rostests/winetests/credui/credui.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/credui/credui.c…
============================================================================== --- trunk/rostests/winetests/credui/credui.c [iso-8859-1] (original) +++ trunk/rostests/winetests/credui/credui.c [iso-8859-1] Sun Nov 22 10:20:50 2015 @@ -23,8 +23,16 @@ #include "windef.h" #include "winbase.h" #include "wincred.h" +#include "sspi.h" #include "wine/test.h" + +static SECURITY_STATUS (SEC_ENTRY *pSspiEncodeAuthIdentityAsStrings) + (PSEC_WINNT_AUTH_IDENTITY_OPAQUE,PCWSTR*,PCWSTR*,PCWSTR*); +static void (SEC_ENTRY *pSspiFreeAuthIdentity) + (PSEC_WINNT_AUTH_IDENTITY_OPAQUE); +static ULONG (SEC_ENTRY *pSspiPromptForCredentialsW) + (PCWSTR,void*,ULONG,PCWSTR,PSEC_WINNT_AUTH_IDENTITY_OPAQUE,PSEC_WINNT_AUTH_IDENTITY_OPAQUE*,int*,ULONG); static void test_CredUIPromptForCredentials(void) { @@ -140,7 +148,71 @@ } } +static void test_SspiPromptForCredentials(void) +{ + static const WCHAR targetW[] = {'S','s','p','i','T','e','s','t',0}; + static const WCHAR basicW[] = {'b','a','s','i','c',0}; + ULONG ret; + SECURITY_STATUS status; + CREDUI_INFOW info; + PSEC_WINNT_AUTH_IDENTITY_OPAQUE id; + const WCHAR *username, *domain, *creds; + int save; + + if (!pSspiPromptForCredentialsW || !pSspiFreeAuthIdentity) + { + win_skip( "SspiPromptForCredentialsW is missing\n" ); + return; + } + + info.cbSize = sizeof(info); + info.hwndParent = NULL; + info.pszMessageText = targetW; + info.pszCaptionText = basicW; + info.hbmBanner = NULL; + ret = pSspiPromptForCredentialsW( NULL, &info, 0, basicW, NULL, &id, &save, 0 ); + ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); + + ret = pSspiPromptForCredentialsW( targetW, &info, 0, NULL, NULL, &id, &save, 0 ); + ok( ret == ERROR_NO_SUCH_PACKAGE, "got %u\n", ret ); + + if (winetest_interactive) + { + id = NULL; + save = -1; + ret = pSspiPromptForCredentialsW( targetW, &info, 0, basicW, NULL, &id, &save, 0 ); + ok( ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "got %u\n", ret ); + if (ret == ERROR_SUCCESS) + { + ok( id != NULL, "id not set\n" ); + ok( save == TRUE || save == FALSE, "got %d\n", save ); + + username = creds = NULL; + domain = (const WCHAR *)0xdeadbeef; + status = pSspiEncodeAuthIdentityAsStrings( id, &username, &domain, &creds ); + ok( status == SEC_E_OK, "got %u\n", status ); + ok( username != NULL, "username not set\n" ); + ok( domain == NULL, "domain not set\n" ); + ok( creds != NULL, "creds not set\n" ); + pSspiFreeAuthIdentity( id ); + } + } +} + START_TEST(credui) { + HMODULE hcredui = GetModuleHandleA( "credui.dll" ), hsecur32 = LoadLibraryA( "secur32.dll" ); + + if (hcredui) + pSspiPromptForCredentialsW = (void *)GetProcAddress( hcredui, "SspiPromptForCredentialsW" ); + if (hsecur32) + { + pSspiEncodeAuthIdentityAsStrings = (void *)GetProcAddress( hsecur32, "SspiEncodeAuthIdentityAsStrings" ); + pSspiFreeAuthIdentity = (void *)GetProcAddress( hsecur32, "SspiFreeAuthIdentity" ); + } + test_CredUIPromptForCredentials(); + test_SspiPromptForCredentials(); + + FreeLibrary( hsecur32 ); }
9 years, 1 month
1
0
0
0
[akhaldi] 70013: [CREDUI] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:20:05 2015 New Revision: 70013 URL:
http://svn.reactos.org/svn/reactos?rev=70013&view=rev
Log: [CREDUI] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/reactos/dll/win32/credui/credui.spec trunk/reactos/dll/win32/credui/credui_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/credui/credui.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui.sp…
============================================================================== --- trunk/reactos/dll/win32/credui/credui.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui.spec [iso-8859-1] Sun Nov 22 10:20:05 2015 @@ -15,3 +15,4 @@ @ stub -private DllGetClassObject @ stub -private DllRegisterServer @ stub -private DllUnregisterServer +@ stdcall SspiPromptForCredentialsW(wstr ptr long wstr ptr ptr ptr long) Modified: trunk/reactos/dll/win32/credui/credui_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_ma…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_main.c [iso-8859-1] Sun Nov 22 10:20:05 2015 @@ -27,6 +27,7 @@ //#include "winnt.h" #include <winuser.h> #include <wincred.h> +#include <sspi.h> #include <commctrl.h> #include "credui_resources.h" @@ -560,7 +561,8 @@ if (!CredEnumerateW(target, 0, &count, &credentials)) return FALSE; for (i = 0; i < count; i++) { - if (credentials[i]->Type != CRED_TYPE_DOMAIN_PASSWORD) + if (credentials[i]->Type != CRED_TYPE_DOMAIN_PASSWORD && + credentials[i]->Type != CRED_TYPE_GENERIC) { FIXME("no support for type %u credentials\n", credentials[i]->Type); continue; @@ -851,3 +853,80 @@ FIXME("() stub\n"); return TRUE; } + +/****************************************************************************** + * SspiPromptForCredentialsW [CREDUI.@] + */ +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 ) +{ + static const WCHAR basicW[] = {'B','a','s','i','c',0}; + static const WCHAR ntlmW[] = {'N','T','L','M',0}; + static const WCHAR negotiateW[] = {'N','e','g','o','t','i','a','t','e',0}; + WCHAR username[CREDUI_MAX_USERNAME_LENGTH + 1] = {0}; + WCHAR password[CREDUI_MAX_PASSWORD_LENGTH + 1] = {0}; + DWORD len_username = sizeof(username) / sizeof(username[0]); + DWORD len_password = sizeof(password) / sizeof(password[0]); + DWORD ret, flags; + CREDUI_INFOW *cred_info = info; + + FIXME( "(%s, %p, %u, %s, %p, %p, %p, %x) stub\n", debugstr_w(target), info, + error, debugstr_w(package), input_id, output_id, save, sspi_flags ); + + if (!target) return ERROR_INVALID_PARAMETER; + if (!package || (strcmpiW( package, basicW ) && strcmpiW( package, ntlmW ) && + strcmpiW( package, negotiateW ))) + { + FIXME( "package %s not supported\n", debugstr_w(package) ); + return ERROR_NO_SUCH_PACKAGE; + } + if (input_id) + { + FIXME( "input identity not supported\n" ); + return ERROR_CALL_NOT_IMPLEMENTED; + } + + flags = CREDUI_FLAGS_ALWAYS_SHOW_UI | CREDUI_FLAGS_GENERIC_CREDENTIALS; + + if (sspi_flags & SSPIPFC_CREDPROV_DO_NOT_SAVE) + flags |= CREDUI_FLAGS_DO_NOT_PERSIST; + + if (!(sspi_flags & SSPIPFC_NO_CHECKBOX)) + flags |= CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX; + + find_existing_credential( target, username, len_username, password, len_password ); + + if (!(ret = CredUIPromptForCredentialsW( cred_info, target, NULL, error, username, + len_username, password, len_password, save, flags ))) + { + SEC_WINNT_AUTH_IDENTITY_W *id; + DWORD size = sizeof(*id); + WCHAR *ptr; + + len_username = strlenW( username ); + len_password = strlenW( password ); + + size += (len_username + 1) * sizeof(WCHAR); + size += (len_password + 1) * sizeof(WCHAR); + if (!(id = HeapAlloc( GetProcessHeap(), 0, size ))) return ERROR_OUTOFMEMORY; + ptr = (WCHAR *)(id + 1); + + memcpy( ptr, username, (len_username + 1) * sizeof(WCHAR) ); + id->User = ptr; + id->UserLength = len_username; + ptr += len_username + 1; + id->Domain = NULL; + id->DomainLength = 0; + memcpy( ptr, password, (len_password + 1) * sizeof(WCHAR) ); + id->Password = ptr; + id->PasswordLength = len_password; + id->Flags = 0; + + *output_id = id; + } + + return ret; +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Nov 22 10:20:05 2015 @@ -57,7 +57,7 @@ reactos/dll/win32/comctl32 # Synced to WineStaging-1.7.47 reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.47 reactos/dll/win32/compstui # Synced to WineStaging-1.7.47 -reactos/dll/win32/credui # Synced to WineStaging-1.7.47 +reactos/dll/win32/credui # Synced to WineStaging-1.7.55 reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.55 reactos/dll/win32/cryptdlg # Synced to WineStaging-1.7.47 reactos/dll/win32/cryptdll # Synced to WineStaging-1.7.47
9 years, 1 month
1
0
0
0
[akhaldi] 70012: [PSDK] Add missing CRED_MAX_CREDENTIAL_BLOB_SIZE.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:19:20 2015 New Revision: 70012 URL:
http://svn.reactos.org/svn/reactos?rev=70012&view=rev
Log: [PSDK] Add missing CRED_MAX_CREDENTIAL_BLOB_SIZE. Modified: trunk/reactos/include/psdk/wincred.h Modified: trunk/reactos/include/psdk/wincred.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincred.h?rev…
============================================================================== --- trunk/reactos/include/psdk/wincred.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wincred.h [iso-8859-1] Sun Nov 22 10:19:20 2015 @@ -184,6 +184,7 @@ #define CRED_MAX_ATTRIBUTES 64 #define CRED_MAX_BLOB_SIZE 512 +#define CRED_MAX_CREDENTIAL_BLOB_SIZE (5 * CRED_MAX_BLOB_SIZE) #define CREDUI_MAX_MESSAGE_LENGTH 32767 #define CREDUI_MAX_CAPTION_LENGTH 128
9 years, 1 month
1
0
0
0
[akhaldi] 70011: [PSDK] Update sspi.h. Annotate SspiPromptForCredentialsW(). CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:17:55 2015 New Revision: 70011 URL:
http://svn.reactos.org/svn/reactos?rev=70011&view=rev
Log: [PSDK] Update sspi.h. Annotate SspiPromptForCredentialsW(). CORE-10536 Modified: trunk/reactos/include/psdk/sspi.h Modified: trunk/reactos/include/psdk/sspi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sspi.h?rev=70…
============================================================================== --- trunk/reactos/include/psdk/sspi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/sspi.h [iso-8859-1] Sun Nov 22 10:17:55 2015 @@ -76,6 +76,15 @@ LONG HighPart; } SECURITY_INTEGER, *PSECURITY_INTEGER; typedef SECURITY_INTEGER TimeStamp, *PTimeStamp; + +#define SSPIPFC_CREDPROV_DO_NOT_SAVE 0x00000001 +#define SSPIPFC_NO_CHECKBOX 0x00000002 + +typedef void *PSEC_WINNT_AUTH_IDENTITY_OPAQUE; + +ULONG SEC_ENTRY SspiPromptForCredentialsW(_In_ PCWSTR, _In_opt_ void *, + _In_ ULONG, _In_ PCWSTR, _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE, + _Outptr_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE *, _Inout_opt_ int *, _In_ ULONG); typedef struct _SecPkgInfoA {
9 years, 1 month
1
0
0
0
[akhaldi] 70010: [WININET_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:15:42 2015 New Revision: 70010 URL:
http://svn.reactos.org/svn/reactos?rev=70010&view=rev
Log: [WININET_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/wininet/http.c trunk/rostests/winetests/wininet/internet.c trunk/rostests/winetests/wininet/urlcache.c Modified: trunk/rostests/winetests/wininet/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/http.c?…
============================================================================== --- trunk/rostests/winetests/wininet/http.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/http.c [iso-8859-1] Sun Nov 22 10:15:42 2015 @@ -2127,6 +2127,13 @@ else send(c, notokmsg, sizeof notokmsg-1, 0); } + if (strstr(buffer, "CONNECT ")) + { + if (!strstr(buffer, "Content-Length: 0")) + send(c, notokmsg, sizeof notokmsg-1, 0); + else + send(c, proxymsg, sizeof proxymsg-1, 0); + } if (strstr(buffer, "/test2")) { if (strstr(buffer, "Proxy-Authorization: Basic bWlrZToxMTAx")) @@ -2174,6 +2181,8 @@ { if (strstr(buffer, "Content-Length: 100")) { + if (strstr(buffer, "POST /test7b")) + recvfrom(c, buffer, sizeof buffer, 0, NULL, NULL); send(c, okmsg, sizeof okmsg-1, 0); send(c, page1, sizeof page1-1, 0); } @@ -2490,7 +2499,7 @@ DWORD r, sz; char buffer[0x40]; - hi = InternetOpenA(NULL, 0, NULL, NULL, 0); + hi = InternetOpenA(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); ok(hi != NULL, "open failed\n"); hc = InternetConnectA(hi, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); @@ -2884,6 +2893,25 @@ ok(r, "HttpQueryInfo failed\n"); ok(!strcmp(buffer, "200"), "proxy code wrong\n"); + InternetCloseHandle(hr); + InternetCloseHandle(hc); + InternetCloseHandle(hi); + + sprintf(buffer, "localhost:%d\n", port); + hi = InternetOpenA("winetest", INTERNET_OPEN_TYPE_PROXY, buffer, NULL, 0); + ok(hi != NULL, "InternetOpen failed\n"); + + hc = InternetConnectA(hi, "
test.winehq.org
", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); + ok(hc != NULL, "InternetConnect failed\n"); + + hr = HttpOpenRequestA(hc, "POST", "/test2", NULL, NULL, NULL, INTERNET_FLAG_SECURE, 0); + ok(hr != NULL, "HttpOpenRequest failed\n"); + + r = HttpSendRequestA(hr, NULL, 0, (char *)"data", sizeof("data")); + ok(r, "HttpSendRequest failed %u\n", GetLastError()); + + test_status_code(hr, 407); + done: InternetCloseHandle(hr); InternetCloseHandle(hc); @@ -2959,7 +2987,7 @@ connect = InternetConnectA(session, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); ok(connect != NULL, "InternetConnect failed\n"); - request = HttpOpenRequestA(connect, "POST", "/test7b", NULL, NULL, types, 0, 0); + request = HttpOpenRequestA(connect, "POST", "/test7b", NULL, NULL, types, INTERNET_FLAG_KEEP_CONNECTION, 0); ok(request != NULL, "HttpOpenRequest failed\n"); ret = HttpAddRequestHeadersA(request, "Content-Length: 100\r\n", ~0u, HTTP_ADDREQ_FLAG_ADD_IF_NEW); @@ -2967,8 +2995,8 @@ data_len = sizeof(data); memset(data, 'a', sizeof(data)); - ret = HttpSendRequestA(request, connection, ~0u, data, data_len); - ok(ret, "HttpSendRequest failed\n"); + ret = HttpSendRequestA(request, NULL, 0, data, data_len); + ok(ret, "HttpSendRequest failed: %u\n", GetLastError()); status = 0; size = sizeof(status); @@ -3526,7 +3554,7 @@ hCompleteEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - session = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, INTERNET_FLAG_ASYNC); + session = InternetOpenA("", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_ASYNC); ok(session != NULL,"InternetOpen failed with error %u\n", GetLastError()); pInternetSetStatusCallbackA(session, callback); @@ -3591,7 +3619,7 @@ hCompleteEvent = CreateEventW(NULL, FALSE, FALSE, NULL); conn_close_event = CreateEventW(NULL, FALSE, FALSE, NULL); - session = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, INTERNET_FLAG_ASYNC); + session = InternetOpenA("", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_ASYNC); ok(session != NULL,"InternetOpen failed with error %u\n", GetLastError()); pInternetSetStatusCallbackA(session, callback); @@ -4602,7 +4630,7 @@ HINTERNET ses, con, req; BOOL ret; - ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); + ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); ok(ses != NULL, "InternetOpen failed\n"); con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); @@ -4640,7 +4668,7 @@ DWORD status, size; BOOL ret; - ses = InternetOpenA( "winetest", 0, NULL, NULL, 0 ); + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); ok( ses != NULL, "InternetOpenA failed\n" ); con = InternetConnectA( ses, "localhost", port, "user", "pwd", @@ -4663,7 +4691,7 @@ InternetCloseHandle( con ); InternetCloseHandle( ses ); - ses = InternetOpenA( "winetest", 0, NULL, NULL, 0 ); + ses = InternetOpenA( "winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); ok( ses != NULL, "InternetOpenA failed\n" ); con = InternetConnectA( ses, "localhost", port, NULL, NULL, @@ -4832,7 +4860,7 @@ CertFreeCertificateChain(chain); }else { ok_(__FILE__,line)(!res && GetLastError() == error, - "InternetGetSecurityInfoByURLA returned: %x(%u), exected %u\n", res, GetLastError(), error); + "InternetGetSecurityInfoByURLA returned: %x(%u), expected %u\n", res, GetLastError(), error); } } @@ -5902,6 +5930,7 @@ WaitForSingleObject( info.wait, 10000 ); Sleep(100); CloseHandle( info.wait ); + DeleteCriticalSection( ¬ification_cs ); } static HINTERNET closetest_session, closetest_req, closetest_conn; @@ -5976,7 +6005,7 @@ DWORD error; BOOL ret; - session = InternetOpenA("winetest", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); + session = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); ok(session != NULL, "failed to get session handle\n"); connect = InternetConnectA(session, "localhost", 1, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); Modified: trunk/rostests/winetests/wininet/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/interne…
============================================================================== --- trunk/rostests/winetests/wininet/internet.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/internet.c [iso-8859-1] Sun Nov 22 10:15:42 2015 @@ -1112,30 +1112,44 @@ SetLastError(0xdeadbeef); ulArg = 11; ret = InternetSetOptionA(NULL, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %x\n", GetLastError()); SetLastError(0xdeadbeef); ulArg = 11; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, 20); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INTERNET_BAD_OPTION_LENGTH, "GetLastError() = %d\n", GetLastError()); ulArg = 11; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); SetLastError(0xdeadbeef); ulArg = 4; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %x\n", GetLastError()); SetLastError(0xdeadbeef); ulArg = 16; ret = InternetSetOptionA(req, INTERNET_OPTION_ERROR_MASK, (void*)&ulArg, sizeof(ULONG)); - ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(ret == FALSE, "InternetSetOption should've failed\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %x\n", GetLastError()); + + ret = InternetSetOptionA(req, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + ret = InternetSetOptionA(ses, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + ret = InternetSetOptionA(ses, INTERNET_OPTION_REFRESH, NULL, 0); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + SetLastError(0xdeadbeef); + ret = InternetSetOptionA(req, INTERNET_OPTION_REFRESH, NULL, 0); + todo_wine ok(ret == FALSE, "InternetSetOption should've failed\n"); + todo_wine ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %x\n", GetLastError()); ret = InternetCloseHandle(req); ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); @@ -1346,6 +1360,35 @@ ok(list.pOptions[1].Value.dwValue == PROXY_TYPE_PROXY, "Retrieved flags should've been PROXY_TYPE_PROXY, was: %d\n", list.pOptions[1].Value.dwValue); + + HeapFree(GetProcessHeap(), 0, list.pOptions[0].Value.pszValue); + HeapFree(GetProcessHeap(), 0, list.pOptions); + + /* test with NULL as proxy server */ + list.dwOptionCount = 1; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[0].Value.pszValue = NULL; + + ret = InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, size); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + ret = InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, size); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + HeapFree(GetProcessHeap(), 0, list.pOptions); + + /* get & verify the proxy server */ + list.dwOptionCount = 1; + list.dwOptionError = 0; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + + ret = InternetQueryOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, &size); + ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + ok(!list.pOptions[0].Value.pszValue, + "Retrieved proxy server should've been NULL, was: \"%s\"\n", + list.pOptions[0].Value.pszValue); HeapFree(GetProcessHeap(), 0, list.pOptions[0].Value.pszValue); HeapFree(GetProcessHeap(), 0, list.pOptions); Modified: trunk/rostests/winetests/wininet/urlcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/urlcach…
============================================================================== --- trunk/rostests/winetests/wininet/urlcache.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/urlcache.c [iso-8859-1] Sun Nov 22 10:15:42 2015 @@ -1090,7 +1090,7 @@ ret = CreateUrlCacheEntryA(url_with_slash, 0, "html", filename, 0); ok(ret, "CreateUrlCacheEntry failed with error %d\n", GetLastError()); - create_and_write_file(filenameA, &zero_byte, sizeof(zero_byte)); + create_and_write_file(filename, &zero_byte, sizeof(zero_byte)); ret = CommitUrlCacheEntryA("Visited:
http://testing.cache.com/
", NULL, filetime_zero, filetime_zero, NORMAL_CACHE_ENTRY, NULL, 0, "html", NULL);
9 years, 1 month
1
0
0
0
[akhaldi] 70009: [WININET] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:15:25 2015 New Revision: 70009 URL:
http://svn.reactos.org/svn/reactos?rev=70009&view=rev
Log: [WININET] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/reactos/dll/win32/wininet/http.c trunk/reactos/dll/win32/wininet/internet.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/wininet/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
============================================================================== --- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Sun Nov 22 10:15:25 2015 @@ -4877,6 +4877,16 @@ return ret; } +static void set_content_length_header( http_request_t *request, DWORD len, DWORD flags ) +{ + static const WCHAR fmtW[] = + {'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':',' ','%','u','\r','\n',0}; + WCHAR buf[sizeof(fmtW)/sizeof(fmtW[0]) + 10]; + + sprintfW( buf, fmtW, len ); + HTTP_HttpAddRequestHeadersW( request, buf, ~0u, flags ); +} + /*********************************************************************** * HTTP_HttpSendRequestW (internal) * @@ -4891,12 +4901,9 @@ DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength, DWORD dwContentLength, BOOL bEndRequest) { - static const WCHAR szContentLength[] = - { 'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':',' ','%','l','i','\r','\n',0 }; BOOL redirected = FALSE, secure_proxy_connect = FALSE, loop_next; LPWSTR requestString = NULL; INT responseLen, cnt; - WCHAR contentLengthStr[sizeof szContentLength/2 /* includes \r\n */ + 20 /* int */ ]; DWORD res; TRACE("--> %p\n", request); @@ -4912,8 +4919,7 @@ if (dwContentLength || strcmpW(request->verb, szGET)) { - sprintfW(contentLengthStr, szContentLength, dwContentLength); - HTTP_HttpAddRequestHeadersW(request, contentLengthStr, -1L, HTTP_ADDREQ_FLAG_ADD_IF_NEW); + set_content_length_header(request, dwContentLength, HTTP_ADDREQ_FLAG_ADD_IF_NEW); request->bytesToWrite = dwContentLength; } if (request->session->appInfo->agent) @@ -5002,6 +5008,10 @@ { static const WCHAR connectW[] = {'C','O','N','N','E','C','T',0}; const WCHAR *target = request->server->host_port; + + if (HTTP_GetCustomHeaderIndex(request, szContent_Length, 0, TRUE) >= 0) + set_content_length_header(request, 0, HTTP_ADDREQ_FLAG_REPLACE); + requestString = build_request_header(request, connectW, target, g_szHttp1_1, TRUE); } else if (request->proxy && !(request->hdr.dwFlags & INTERNET_FLAG_SECURE)) @@ -5011,7 +5021,12 @@ heap_free(url); } else + { + if (request->proxy && HTTP_GetCustomHeaderIndex(request, szContent_Length, 0, TRUE) >= 0) + set_content_length_header(request, dwContentLength, HTTP_ADDREQ_FLAG_REPLACE); + requestString = build_request_header(request, request->verb, request->path, request->version, TRUE); + } TRACE("Request header -> %s\n", debugstr_w(requestString) ); Modified: trunk/reactos/dll/win32/wininet/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
============================================================================== --- trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] Sun Nov 22 10:15:25 2015 @@ -322,7 +322,7 @@ } else { - if ((ret = RegDeleteValueW( key, szProxyServer ))) + if ((ret = RegDeleteValueW( key, szProxyServer )) && ret != ERROR_FILE_NOT_FOUND) { RegCloseKey( key ); return ret; @@ -1283,9 +1283,8 @@ HINTERNET rc = NULL; DWORD res = ERROR_SUCCESS; - TRACE("(%p, %s, %i, %s, %s, %i, %x, %lx)\n", hInternet, debugstr_w(lpszServerName), - nServerPort, debugstr_w(lpszUserName), debugstr_w(lpszPassword), - dwService, dwFlags, dwContext); + TRACE("(%p, %s, %u, %s, %p, %u, %x, %lx)\n", hInternet, debugstr_w(lpszServerName), + nServerPort, debugstr_w(lpszUserName), lpszPassword, dwService, dwFlags, dwContext); if (!lpszServerName) { @@ -2382,7 +2381,8 @@ CFRelease( settings ); return ret; #else - FIXME( "no support on this platform\n" ); + static int once; + if (!once++) FIXME( "no support on this platform\n" ); return FALSE; #endif } @@ -2730,6 +2730,15 @@ case INTERNET_OPTION_SETTINGS_CHANGED: FIXME("INTERNETOPTION_SETTINGS_CHANGED semi-stub\n"); collect_connections(COLLECT_CONNECTIONS); + return ERROR_SUCCESS; + + case INTERNET_OPTION_SUPPRESS_BEHAVIOR: + FIXME("INTERNET_OPTION_SUPPRESS_BEHAVIOR stub\n"); + + if(size != sizeof(ULONG)) + return ERROR_INTERNET_BAD_OPTION_LENGTH; + + FIXME("%08x\n", *(ULONG*)buf); return ERROR_SUCCESS; } @@ -3002,6 +3011,12 @@ ret = (res == ERROR_SUCCESS); break; } + case INTERNET_OPTION_SETTINGS_CHANGED: + FIXME("INTERNET_OPTION_SETTINGS_CHANGED; STUB\n"); + break; + case INTERNET_OPTION_REFRESH: + FIXME("INTERNET_OPTION_REFRESH; STUB\n"); + break; default: FIXME("Option %d STUB\n",dwOption); SetLastError(ERROR_INTERNET_INVALID_OPTION); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Nov 22 10:15:25 2015 @@ -205,7 +205,7 @@ reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.7.47 reactos/dll/win32/wing32 # Synced to WineStaging-1.7.55 reactos/dll/win32/winhttp # Synced to WineStaging-1.7.55 -reactos/dll/win32/wininet # Synced to WineStaging-1.7.47 +reactos/dll/win32/wininet # Synced to WineStaging-1.7.55 reactos/dll/win32/winmm # Forked at Wine-20050628 reactos/dll/win32/winmm/midimap # Forked at Wine-20050628 reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
9 years, 1 month
1
0
0
0
[akhaldi] 70008: [WINHTTP_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:13:49 2015 New Revision: 70008 URL:
http://svn.reactos.org/svn/reactos?rev=70008&view=rev
Log: [WINHTTP_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/winhttp/notification.c trunk/rostests/winetests/winhttp/url.c trunk/rostests/winetests/winhttp/winhttp.c Modified: trunk/rostests/winetests/winhttp/notification.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/notific…
============================================================================== --- trunk/rostests/winetests/winhttp/notification.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/notification.c [iso-8859-1] Sun Nov 22 10:13:49 2015 @@ -158,9 +158,9 @@ static void test_connection_cache( void ) { - HANDLE ses, con, req; - DWORD size, status; - BOOL ret; + HANDLE ses, con, req, event; + DWORD size, status, err; + BOOL ret, unload = TRUE; struct info info, *context = &info; info.test = cache_test; @@ -171,6 +171,14 @@ ses = WinHttpOpen( user_agent, 0, NULL, NULL, 0 ); ok(ses != NULL, "failed to open session %u\n", GetLastError()); + event = CreateEventW( NULL, FALSE, FALSE, NULL ); + ret = WinHttpSetOption( ses, WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT, &event, sizeof(event) ); + if (!ret) + { + win_skip("Unload event not supported\n"); + unload = FALSE; + } + WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 ); ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) ); @@ -186,7 +194,8 @@ setup_test( &info, winhttp_send_request, __LINE__ ); ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -214,7 +223,8 @@ setup_test( &info, winhttp_send_request, __LINE__ ); ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -236,14 +246,32 @@ setup_test( &info, winhttp_close_handle, __LINE__ ); WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); + + if (unload) + { + status = WaitForSingleObject( event, 0 ); + ok(status == WAIT_TIMEOUT, "got %08x\n", status); + } + WinHttpCloseHandle( ses ); Sleep(2000); /* make sure connection is evicted from cache */ + if (unload) + { + status = WaitForSingleObject( event, 0 ); + ok(status == WAIT_OBJECT_0, "got %08x\n", status); + } info.index = 0; ses = WinHttpOpen( user_agent, 0, NULL, NULL, 0 ); ok(ses != NULL, "failed to open session %u\n", GetLastError()); + + if (unload) + { + ret = WinHttpSetOption( ses, WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT, &event, sizeof(event) ); + ok(ret, "failed to set unload option\n"); + } WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 ); @@ -263,7 +291,8 @@ setup_test( &info, winhttp_send_request, __LINE__ ); ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -291,7 +320,8 @@ setup_test( &info, winhttp_send_request, __LINE__ ); ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -311,9 +341,23 @@ done: WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); + + if (unload) + { + status = WaitForSingleObject( event, 0 ); + ok(status == WAIT_TIMEOUT, "got %08x\n", status); + } + WinHttpCloseHandle( ses ); Sleep(2000); /* make sure connection is evicted from cache */ + if (unload) + { + status = WaitForSingleObject( event, 0 ); + ok(status == WAIT_OBJECT_0, "got %08x\n", status); + } + + CloseHandle( event ); } static const struct notification redirect_test[] = @@ -347,7 +391,7 @@ static void test_redirect( void ) { HANDLE ses, con, req; - DWORD size, status; + DWORD size, status, err; BOOL ret; struct info info, *context = &info; @@ -374,7 +418,8 @@ setup_test( &info, winhttp_send_request, __LINE__ ); ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -433,9 +478,9 @@ static void test_async( void ) { - HANDLE ses, con, req; - DWORD size, status; - BOOL ret; + HANDLE ses, con, req, event; + DWORD size, status, err; + BOOL ret, unload = TRUE; struct info info, *context = &info; char buffer[1024]; @@ -447,22 +492,44 @@ ses = WinHttpOpen( user_agent, 0, NULL, NULL, WINHTTP_FLAG_ASYNC ); ok(ses != NULL, "failed to open session %u\n", GetLastError()); + event = CreateEventW( NULL, FALSE, FALSE, NULL ); + ret = WinHttpSetOption( ses, WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT, &event, sizeof(event) ); + if (!ret) + { + win_skip("Unload event not supported\n"); + unload = FALSE; + } + + SetLastError( 0xdeadbeef ); WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 ); - + err = GetLastError(); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); + + SetLastError( 0xdeadbeef ); ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) ); - ok(ret, "failed to set context value %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "failed to set context value %u\n", err); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); setup_test( &info, winhttp_connect, __LINE__ ); + SetLastError( 0xdeadbeef ); con = WinHttpConnect( ses, test_winehq, 0, 0 ); - ok(con != NULL, "failed to open a connection %u\n", GetLastError()); + err = GetLastError(); + ok(con != NULL, "failed to open a connection %u\n", err); + ok(err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %u\n", err); setup_test( &info, winhttp_open_request, __LINE__ ); + SetLastError( 0xdeadbeef ); req = WinHttpOpenRequest( con, NULL, NULL, NULL, NULL, NULL, 0 ); - ok(req != NULL, "failed to open a request %u\n", GetLastError()); + err = GetLastError(); + ok(req != NULL, "failed to open a request %u\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); setup_test( &info, winhttp_send_request, __LINE__ ); + SetLastError( 0xdeadbeef ); ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); WinHttpCloseHandle( req ); @@ -471,39 +538,65 @@ CloseHandle( info.wait ); return; } - ok(ret, "failed to send request %u\n", GetLastError()); + ok(ret, "failed to send request %u\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); WaitForSingleObject( info.wait, INFINITE ); setup_test( &info, winhttp_receive_response, __LINE__ ); + SetLastError( 0xdeadbeef ); ret = WinHttpReceiveResponse( req, NULL ); - ok(ret, "failed to receive response %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "failed to receive response %u\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); WaitForSingleObject( info.wait, INFINITE ); size = sizeof(status); + SetLastError( 0xdeadbeef ); ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); - ok(ret, "failed unexpectedly %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "failed unexpectedly %u\n", err); ok(status == 200, "request failed unexpectedly %u\n", status); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); setup_test( &info, winhttp_query_data, __LINE__ ); + SetLastError( 0xdeadbeef ); ret = WinHttpQueryDataAvailable( req, NULL ); - ok(ret, "failed to query data available %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "failed to query data available %u\n", err); + ok(err == ERROR_SUCCESS || err == ERROR_IO_PENDING || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); WaitForSingleObject( info.wait, INFINITE ); setup_test( &info, winhttp_read_data, __LINE__ ); + SetLastError( 0xdeadbeef ); ret = WinHttpReadData( req, buffer, sizeof(buffer), NULL ); - ok(ret, "failed to query data available %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "failed to read data %u\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); WaitForSingleObject( info.wait, INFINITE ); setup_test( &info, winhttp_close_handle, __LINE__ ); WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); + + if (unload) + { + status = WaitForSingleObject( event, 0 ); + ok(status == WAIT_TIMEOUT, "got %08x\n", status); + } WinHttpCloseHandle( ses ); WaitForSingleObject( info.wait, INFINITE ); + + if (unload) + { + status = WaitForSingleObject( event, 2000 ); + ok(status == WAIT_OBJECT_0, "got %08x\n", status); + } + CloseHandle( event ); CloseHandle( info.wait ); } Modified: trunk/rostests/winetests/winhttp/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/url.c?r…
============================================================================== --- trunk/rostests/winetests/winhttp/url.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/url.c [iso-8859-1] Sun Nov 22 10:13:49 2015 @@ -169,11 +169,14 @@ ok( len == 57, "expected len 57 got %u\n", len ); /* allocated url, NULL scheme */ + SetLastError( 0xdeadbeef ); uc.lpszScheme = NULL; url[0] = 0; len = 256; ret = WinHttpCreateUrl( &uc, 0, url, &len ); ok( ret, "expected success\n" ); + ok( GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "expected ERROR_SUCCESS got %u\n", GetLastError() ); ok( len == 56, "expected len 56 got %u\n", len ); ok( !lstrcmpW( url, url1 ), "url doesn't match\n" ); @@ -380,9 +383,13 @@ /* no buffers */ reset_url_components( &uc ); + SetLastError( 0xdeadbeef ); ret = WinHttpCrackUrl( url_k1, 0, 0,&uc); - - ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() ); + error = GetLastError(); + + ok( ret, "WinHttpCrackUrl failed le=%u\n", error ); + ok( error == ERROR_SUCCESS || broken(error == ERROR_INVALID_PARAMETER) /* < win7 */, + "got %u, expected ERROR_SUCCESS\n", error ); ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" ); ok( uc.lpszScheme == url_k1,"unexpected scheme\n" ); ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" ); Modified: trunk/rostests/winetests/winhttp/winhttp.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/winhttp…
============================================================================== --- trunk/rostests/winetests/winhttp/winhttp.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/winhttp.c [iso-8859-1] Sun Nov 22 10:13:49 2015 @@ -2,6 +2,7 @@ * WinHTTP - tests * * Copyright 2008 Google (Zac Brown) + * Copyright 2015 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,6 +27,7 @@ #include <stdarg.h> #include <windef.h> #include <winbase.h> +#include <winnls.h> #include <ole2.h> #include <winsock2.h> //#include <ws2tcpip.h> @@ -34,6 +36,7 @@ #include <winreg.h> //#include "initguid.h" #include <httprequest.h> +#include <httprequestid.h> #include <wine/test.h> @@ -47,8 +50,11 @@ WINHTTP_PROXY_INFO proxy_info; BOOL active = FALSE; + SetLastError(0xdeadbeef); if (WinHttpGetDefaultProxyConfiguration(&proxy_info)) { + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "got %u\n", GetLastError()); active = (proxy_info.lpszProxy != NULL); if (active) GlobalFree(proxy_info.lpszProxy); @@ -99,6 +105,8 @@ SetLastError(0xdeadbeef); ret = WinHttpQueryOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, &size); ok(ret, "failed to query option %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "got %u\n", GetLastError()); ok(size == sizeof(feature), "WinHttpQueryOption should set the size: %u\n", size); ok(feature == WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP, "expected WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP, got %#x\n", feature); @@ -213,39 +221,57 @@ { BOOL ret; HINTERNET session, request, connection; - + DWORD err; + + SetLastError(0xdeadbeef); session = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); + err = GetLastError(); ok(session != NULL, "WinHttpOpen failed to open session.\n"); + ok(err == ERROR_SUCCESS, "got %u\n", err); /* Test with a bad server name */ SetLastError(0xdeadbeef); connection = WinHttpConnect(session, NULL, INTERNET_DEFAULT_HTTP_PORT, 0); + err = GetLastError(); ok (connection == NULL, "WinHttpConnect succeeded in opening connection to NULL server argument.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError()); + ok(err == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u.\n", err); /* Test with a valid server name */ + SetLastError(0xdeadbeef); connection = WinHttpConnect (session, test_winehq, INTERNET_DEFAULT_HTTP_PORT, 0); - ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u.\n", GetLastError()); - + err = GetLastError(); + ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u.\n", err); + ok(err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %u\n", err); + + SetLastError(0xdeadbeef); request = WinHttpOpenRequest(connection, NULL, NULL, NULL, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, 0); - if (request == NULL && GetLastError() == ERROR_WINHTTP_NAME_NOT_RESOLVED) + err = GetLastError(); + if (request == NULL && err == ERROR_WINHTTP_NAME_NOT_RESOLVED) { skip("Network unreachable, skipping.\n"); goto done; } - ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %u.\n", GetLastError()); - + ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %u.\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); + + SetLastError(0xdeadbeef); ret = WinHttpSendRequest(request, WINHTTP_NO_ADDITIONAL_HEADERS, 0, NULL, 0, 0, 0); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("Connection failed, skipping.\n"); goto done; } - ok(ret == TRUE, "WinHttpSendRequest failed: %u\n", GetLastError()); + ok(ret, "WinHttpSendRequest failed: %u\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); + + SetLastError(0xdeadbeef); ret = WinHttpCloseHandle(request); - ok(ret == TRUE, "WinHttpCloseHandle failed on closing request, got %d.\n", ret); + err = GetLastError(); + ok(ret, "WinHttpCloseHandle failed on closing request, got %u.\n", err); + ok(err == ERROR_SUCCESS, "got %u\n", err); done: ret = WinHttpCloseHandle(connection); @@ -259,6 +285,7 @@ { static const WCHAR empty[] = {0}; HINTERNET ses, con, req; + DWORD err; BOOL ret; ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); @@ -271,7 +298,8 @@ ok(req != NULL, "failed to open a request %u\n", GetLastError()); ret = WinHttpSendRequest(req, empty, 0, NULL, 0, 0, 0); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -294,7 +322,7 @@ static CHAR post_data[] = "mode=Test"; static const char test_post[] = "mode => Test\0\n"; HINTERNET session, request, connection; - DWORD header_len, optional_len, total_len, bytes_rw, size; + DWORD header_len, optional_len, total_len, bytes_rw, size, err; DWORD_PTR context; BOOL ret; CHAR buffer[256]; @@ -327,7 +355,8 @@ context++; ret = WinHttpSendRequest(request, content_type, header_len, post_data, optional_len, total_len, context); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -343,9 +372,13 @@ for (i = 3; post_data[i]; i++) { bytes_rw = -1; + SetLastError(0xdeadbeef); ret = WinHttpWriteData(request, &post_data[i], 1, &bytes_rw); if (ret) + { + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %u.\n", GetLastError()); ok(bytes_rw == 1, "WinHttpWriteData failed, wrote %u bytes instead of 1 byte.\n", bytes_rw); + } else /* Since we already passed all optional data in WinHttpSendRequest Win7 fails our WinHttpWriteData call */ { ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER got %u.\n", GetLastError()); @@ -353,7 +386,10 @@ } } + SetLastError(0xdeadbeef); ret = WinHttpReceiveResponse(request, NULL); + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == ERROR_NO_TOKEN) /* < win7 */, + "Expected ERROR_SUCCESS got %u.\n", GetLastError()); ok(ret == TRUE, "WinHttpReceiveResponse failed: %u.\n", GetLastError()); bytes_rw = -1; @@ -380,9 +416,25 @@ {'M','o','n',',',' ','2','8',' ','J','u','l',' ','2','0','0','8',' ', '1','0',':','0','5',':','5','2',' ','G','M','T',0}; WCHAR time_string[WINHTTP_TIME_FORMAT_BUFSIZE+1]; - + DWORD err; + + SetLastError(0xdeadbeef); + ret = WinHttpTimeFromSystemTime(&time, NULL); + err = GetLastError(); + ok(!ret, "WinHttpTimeFromSystemTime succeeded\n"); + ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err); + + SetLastError(0xdeadbeef); + ret = WinHttpTimeFromSystemTime(NULL, time_string); + err = GetLastError(); + ok(!ret, "WinHttpTimeFromSystemTime succeeded\n"); + ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err); + + SetLastError(0xdeadbeef); ret = WinHttpTimeFromSystemTime(&time, time_string); - ok(ret == TRUE, "WinHttpTimeFromSystemTime failed: %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "WinHttpTimeFromSystemTime failed: %u\n", err); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); ok(memcmp(time_string, expected_string, sizeof(expected_string)) == 0, "Time string returned did not match expected time string.\n"); } @@ -398,14 +450,33 @@ static const WCHAR time_string2[] = {' ','m','o','n',' ','2','8',' ','j','u','l',' ','2','0','0','8',' ', '1','0',' ','0','5',' ','5','2','\n',0}; - + DWORD err; + + SetLastError(0xdeadbeef); + ret = WinHttpTimeToSystemTime(time_string1, NULL); + err = GetLastError(); + ok(!ret, "WinHttpTimeToSystemTime succeeded\n"); + ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err); + + SetLastError(0xdeadbeef); + ret = WinHttpTimeToSystemTime(NULL, &time); + err = GetLastError(); + ok(!ret, "WinHttpTimeToSystemTime succeeded\n"); + ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err); + + SetLastError(0xdeadbeef); ret = WinHttpTimeToSystemTime(time_string1, &time); - ok(ret == TRUE, "WinHttpTimeToSystemTime failed: %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "WinHttpTimeToSystemTime failed: %u\n", err); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); ok(memcmp(&time, &expected_time, sizeof(SYSTEMTIME)) == 0, "Returned SYSTEMTIME structure did not match expected SYSTEMTIME structure.\n"); + SetLastError(0xdeadbeef); ret = WinHttpTimeToSystemTime(time_string2, &time); - ok(ret == TRUE, "WinHttpTimeToSystemTime failed: %u\n", GetLastError()); + err = GetLastError(); + ok(ret, "WinHttpTimeToSystemTime failed: %u\n", err); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); ok(memcmp(&time, &expected_time, sizeof(SYSTEMTIME)) == 0, "Returned SYSTEMTIME structure did not match expected SYSTEMTIME structure.\n"); } @@ -423,7 +494,8 @@ static const WCHAR test_header_begin[] = {'P','O','S','T',' ','/','p','o','s','t','t','e','s','t','.','p','h','p',' ','H','T','T','P','/','1'}; static const WCHAR full_path_test_header_begin[] = - {'P','O','S','T',' ','h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',':','8','0','/','p','o','s','t','.','p','h','p',' ','H','T','T','P','/','1'}; + {'P','O','S','T',' ','h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',':','8','0', + '/','p','o','s','t','t','e','s','t','.','p','h','p',' ','H','T','T','P','/','1'}; static const WCHAR test_header_end[] = {'\r','\n','\r','\n',0}; static const WCHAR test_header_name[] = {'W','a','r','n','i','n','g',0}; static const WCHAR test_header_name2[] = {'n','a','m','e',0}; @@ -496,8 +568,11 @@ ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS, test_header_name, buffer, &len, &index); ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded, found 'Warning' header.\n"); + SetLastError(0xdeadbeef); ret = WinHttpAddRequestHeaders(request, test_headers[0], -1L, WINHTTP_ADDREQ_FLAG_ADD); - ok(ret == TRUE, "WinHttpAddRequestHeader failed to add new header, got %d with error %u.\n", ret, GetLastError()); + err = GetLastError(); + ok(ret, "WinHttpAddRequestHeader failed to add new header, got %d with error %u.\n", ret, err); + ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err); index = 0; len = sizeof(buffer); @@ -901,7 +976,7 @@ static void test_secure_connection(void) { HINTERNET ses, con, req; - DWORD size, status, policy, bitness, read_size; + DWORD size, status, policy, bitness, read_size, err; BOOL ret; CERT_CONTEXT *cert; WINHTTP_CERTIFICATE_INFO info; @@ -922,7 +997,8 @@ ok(req != NULL, "failed to open a request %u\n", GetLastError()); ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("Connection failed, skipping.\n"); goto cleanup; @@ -944,7 +1020,9 @@ WinHttpSetStatusCallback(req, cert_error, WINHTTP_CALLBACK_STATUS_SECURE_FAILURE, 0); ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); - if (!ret && (GetLastError() == ERROR_WINHTTP_SECURE_FAILURE || GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_SECURE_FAILURE || err == ERROR_WINHTTP_CANNOT_CONNECT || + err == ERROR_WINHTTP_TIMEOUT)) { skip("secure connection failed, skipping remaining secure tests\n"); goto cleanup; @@ -1022,7 +1100,8 @@ ok(req != NULL, "failed to open a request %u\n", GetLastError()); ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + error = GetLastError(); + if (!ret && (error == ERROR_WINHTTP_CANNOT_CONNECT || error == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -1049,7 +1128,8 @@ ok(req != NULL, "failed to open a request %u\n", GetLastError()); ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); - if (!ret && (GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT || GetLastError() == ERROR_WINHTTP_TIMEOUT)) + error = GetLastError(); + if (!ret && (error == ERROR_WINHTTP_CANNOT_CONNECT || error == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -1216,9 +1296,11 @@ if (!ret && GetLastError() == ERROR_ACCESS_DENIED) skip("couldn't set default proxy configuration: access denied\n"); else - ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %d\n", - GetLastError()); - + { + ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "got %u\n", GetLastError()); + } set_default_proxy_reg_value( saved_proxy_settings, len, type ); } @@ -1254,6 +1336,8 @@ SetLastError(0xdeadbeef); ret = WinHttpSetTimeouts(ses, -1, -1, -1, -1); ok(ret, "%u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "expected ERROR_SUCCESS, got %u\n", GetLastError()); SetLastError(0xdeadbeef); ret = WinHttpSetTimeouts(ses, 0, 0, 0, 0); @@ -2060,12 +2144,15 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path) { + static const WCHAR test_header_end_clrf[] = {'\r','\n','\r','\n',0}; + static const WCHAR test_header_end_raw[] = {0,0}; HINTERNET ses, con, req; char buffer[0x100]; + WCHAR buffer2[0x100]; DWORD count, status, size, error, supported, first, target; BOOL ret; - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2095,6 +2182,21 @@ ok(supported == 0xdeadbeef, "got %x\n", supported); ok(first == 0xdeadbeef, "got %x\n", first); ok(target == 0xdeadbeef, "got %x\n", target); + + size = sizeof(buffer2); + memset(buffer2, 0, sizeof(buffer2)); + ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, buffer2, &size, NULL); + ok(ret, "failed to query for raw headers: %u\n", GetLastError()); + ok(!memcmp(buffer2 + lstrlenW(buffer2) - 4, test_header_end_clrf, sizeof(test_header_end_clrf)), + "WinHttpQueryHeaders returned invalid end of header string\n"); + + size = sizeof(buffer2); + memset(buffer2, 0, sizeof(buffer2)); + ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS, NULL, buffer2, &size, NULL); + ok(ret, "failed to query for raw headers: %u\n", GetLastError()); + ok(!memcmp(buffer2 + (size / sizeof(WCHAR)) - 1, test_header_end_raw, sizeof(test_header_end_raw)), + "WinHttpQueryHeaders returned invalid end of header string\n"); + ok(buffer2[(size / sizeof(WCHAR)) - 2] != 0, "returned string has too many NULL characters\n"); count = 0; memset(buffer, 0, sizeof(buffer)); @@ -2118,7 +2220,7 @@ DWORD status, size, error, supported, first, target; BOOL ret; - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2189,14 +2291,20 @@ ok(status == 401, "request failed unexpectedly %u\n", status); supported = first = target = 0xdeadbeef; + SetLastError(0xdeadbeef); ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target); - ok(ret, "failed to query authentication schemes %u\n", GetLastError()); + error = GetLastError(); + ok(ret, "failed to query authentication schemes %u\n", error); + ok(error == ERROR_SUCCESS || broken(error == 0xdeadbeef) /* < win7 */, "expected ERROR_SUCCESS, got %u\n", error); ok(supported == WINHTTP_AUTH_SCHEME_BASIC, "got %x\n", supported); ok(first == WINHTTP_AUTH_SCHEME_BASIC, "got %x\n", first); ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target); + SetLastError(0xdeadbeef); ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_NTLM, NULL, NULL, NULL); - ok(ret, "failed to set credentials %u\n", GetLastError()); + error = GetLastError(); + ok(ret, "failed to set credentials %u\n", error); + ok(error == ERROR_SUCCESS || broken(error == 0xdeadbeef) /* < win7 */, "expected ERROR_SUCCESS, got %u\n", error); ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_PASSPORT, NULL, NULL, NULL); ok(ret, "failed to set credentials %u\n", GetLastError()); @@ -2249,7 +2357,7 @@ /* credentials set with WinHttpSetCredentials take precedence over those set through options */ - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2283,7 +2391,7 @@ WinHttpCloseHandle(con); WinHttpCloseHandle(ses); - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2325,7 +2433,7 @@ DWORD error; BOOL ret; - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2362,7 +2470,7 @@ DWORD size, len = sizeof(buf), bytes_read, status; BOOL ret; - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2401,18 +2509,23 @@ ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, 0); ok(!ret, "expected no content-length header\n"); - ok(GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, - "wrong error %u\n", GetLastError() ); + ok(GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "wrong error %u\n", GetLastError()); ok(status == 12345, "expected 0, got %d\n", status); + SetLastError(0xdeadbeef); size = 12345; ret = WinHttpQueryDataAvailable(req, &size); ok(ret, "expected success\n"); - ok(size == 0, "expected 0, got %d\n", size); - + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "wrong error %u\n", GetLastError()); + ok(!size, "expected 0, got %u\n", size); + + SetLastError(0xdeadbeef); ret = WinHttpReadData(req, buf, len, &bytes_read); ok(ret, "expected success\n"); - ok( bytes_read == 0, "expected 0, got %u available\n", bytes_read ); + ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */, + "wrong error %u\n", GetLastError()); + ok(!bytes_read, "expected 0, got %u\n", bytes_read); size = 12345; ret = WinHttpQueryDataAvailable(req, &size); @@ -2442,7 +2555,7 @@ DWORD size, len, count, status; BOOL ret; - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2507,7 +2620,7 @@ GetSystemTime(&st); WinHttpTimeFromSystemTime(&st, &today[sizeof(ifmodifiedW)/sizeof(WCHAR)]); - session = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, + session = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); ok(session != NULL, "WinHttpOpen failed: %u\n", GetLastError()); @@ -2561,7 +2674,7 @@ DWORD index, len; BOOL ret; - ses = WinHttpOpen( test_useragent, 0, NULL, NULL, 0 ); + ses = WinHttpOpen( test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 ); ok( ses != NULL, "failed to open session %u\n", GetLastError() ); con = WinHttpConnect( ses, localhostW, port, 0 ); @@ -2593,7 +2706,7 @@ DWORD total_len = 0; BOOL ret; - ses = WinHttpOpen(test_useragent, 0, NULL, NULL, 0); + ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); ok(ses != NULL, "failed to open session %u\n", GetLastError()); con = WinHttpConnect(ses, localhostW, port, 0); @@ -2646,7 +2759,7 @@ DWORD status, size; BOOL ret; - ses = WinHttpOpen( test_useragent, 0, NULL, NULL, 0 ); + ses = WinHttpOpen( test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 ); ok( ses != NULL, "failed to open session %u\n", GetLastError() ); con = WinHttpConnect( ses, localhostW, port, 0 ); @@ -2726,7 +2839,7 @@ WinHttpCloseHandle( con ); WinHttpCloseHandle( ses ); - ses = WinHttpOpen( test_useragent, 0, NULL, NULL, 0 ); + ses = WinHttpOpen( test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 ); ok( ses != NULL, "failed to open session %u\n", GetLastError() ); con = WinHttpConnect( ses, localhostW, port, 0 ); @@ -2760,7 +2873,7 @@ DWORD size, error; BOOL ret; - ses = WinHttpOpen( test_useragent, 0, NULL, NULL, 0 ); + ses = WinHttpOpen( test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 ); ok( ses != NULL, "failed to open session %u\n", GetLastError() ); con = WinHttpConnect( ses, localhostW, port, 0 ); @@ -2948,11 +3061,12 @@ static const WCHAR connectionW[] = {'C','o','n','n','e','c','t','i','o','n',0}; static const WCHAR dateW[] = {'D','a','t','e',0}; static const WCHAR test_dataW[] = {'t','e','s','t','d','a','t','a',128,0}; + static const WCHAR utf8W[] = {'u','t','f','-','8',0}; HRESULT hr; IWinHttpRequest *req; BSTR method, url, username, password, response = NULL, status_text = NULL, headers = NULL; BSTR date, today, connection, value = NULL; - VARIANT async, empty, timeout, body, body2, proxy_server, bypass_list, data; + VARIANT async, empty, timeout, body, body2, proxy_server, bypass_list, data, cp; VARIANT_BOOL succeeded; LONG status; WCHAR todayW[WINHTTP_TIME_FORMAT_BUFSIZE]; @@ -3035,6 +3149,39 @@ V_ERROR( &async ) = DISP_E_PARAMNOTFOUND; hr = IWinHttpRequest_Open( req, method, url, async ); ok( hr == S_OK, "got %08x\n", hr ); + + V_VT( &cp ) = VT_ERROR; + V_ERROR( &cp ) = 0xdeadbeef; + hr = IWinHttpRequest_get_Option( req, WinHttpRequestOption_URLCodePage, &cp ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( V_VT( &cp ) == VT_I4, "got %08x\n", V_VT( &cp ) ); + ok( V_I4( &cp ) == CP_UTF8, "got %u\n", V_I4( &cp ) ); + + V_VT( &cp ) = VT_UI4; + V_UI4( &cp ) = CP_ACP; + hr = IWinHttpRequest_put_Option( req, WinHttpRequestOption_URLCodePage, cp ); + ok( hr == S_OK, "got %08x\n", hr ); + + V_VT( &cp ) = VT_ERROR; + V_ERROR( &cp ) = 0xdeadbeef; + hr = IWinHttpRequest_get_Option( req, WinHttpRequestOption_URLCodePage, &cp ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( V_VT( &cp ) == VT_I4, "got %08x\n", V_VT( &cp ) ); + ok( V_I4( &cp ) == CP_ACP, "got %u\n", V_I4( &cp ) ); + + value = SysAllocString( utf8W ); + V_VT( &cp ) = VT_BSTR; + V_BSTR( &cp ) = value; + hr = IWinHttpRequest_put_Option( req, WinHttpRequestOption_URLCodePage, cp ); + ok( hr == S_OK, "got %08x\n", hr ); + SysFreeString( value ); + + V_VT( &cp ) = VT_ERROR; + V_ERROR( &cp ) = 0xdeadbeef; + hr = IWinHttpRequest_get_Option( req, WinHttpRequestOption_URLCodePage, &cp ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( V_VT( &cp ) == VT_I4, "got %08x\n", V_VT( &cp ) ); + ok( V_I4( &cp ) == CP_UTF8, "got %u\n", V_I4( &cp ) ); hr = IWinHttpRequest_Abort( req ); ok( hr == S_OK, "got %08x\n", hr ); @@ -3407,6 +3554,241 @@ SysFreeString( today ); VariantClear( &proxy_server ); VariantClear( &bypass_list ); + CoUninitialize(); +} + +static void request_get_property(IWinHttpRequest *request, int property, VARIANT *ret) +{ + DISPPARAMS params; + VARIANT arg; + HRESULT hr; + + memset(¶ms, 0, sizeof(params)); + params.cNamedArgs = 0; + params.rgdispidNamedArgs = NULL; + params.cArgs = 1; + params.rgvarg = &arg; + VariantInit(&arg); + V_VT(&arg) = VT_I4; + V_I4(&arg) = property; + VariantInit(ret); + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, + DISPATCH_PROPERTYGET, ¶ms, ret, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); +} + +static void test_IWinHttpRequest_Invoke(void) +{ + static const WCHAR utf8W[] = {'U','T','F','-','8',0}; + static const WCHAR regid[] = {'W','i','n','H','t','t','p','.','W','i','n','H','t','t','p','R','e','q','u','e','s','t','.','5','.','1',0}; + WCHAR openW[] = {'O','p','e','n',0}; + WCHAR optionW[] = {'O','p','t','i','o','n',0}; + OLECHAR *open = openW, *option = optionW; + BSTR utf8; + CLSID clsid; + IWinHttpRequest *request; + IDispatch *dispatch; + DISPID id; + DISPPARAMS params; + VARIANT arg[3], ret; + UINT err; + BOOL bret; + HRESULT hr; + + CoInitialize(NULL); + + hr = CLSIDFromProgID(regid, &clsid); + ok(hr == S_OK, "CLSIDFromProgID error %#x\n", hr); + bret = IsEqualIID(&clsid, &CLSID_WinHttpRequest); + ok(bret || broken(!bret) /* win2003 */, "not expected %s\n", wine_dbgstr_guid(&clsid)); + + hr = CoCreateInstance(&CLSID_WinHttpRequest, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&request); + ok(hr == S_OK, "error %#x\n", hr); + + hr = IWinHttpRequest_QueryInterface(request, &IID_IDispatch, (void **)&dispatch); + ok(hr == S_OK, "error %#x\n", hr); + IDispatch_Release(dispatch); + + hr = IWinHttpRequest_GetIDsOfNames(request, &IID_NULL, &open, 1, 0x0409, &id); + ok(hr == S_OK, "error %#x\n", hr); + ok(id == DISPID_HTTPREQUEST_OPEN, "expected DISPID_HTTPREQUEST_OPEN, got %u\n", id); + + hr = IWinHttpRequest_GetIDsOfNames(request, &IID_NULL, &option, 1, 0x0409, &id); + ok(hr == S_OK, "error %#x\n", hr); + ok(id == DISPID_HTTPREQUEST_OPTION, "expected DISPID_HTTPREQUEST_OPTION, got %u\n", id); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret)); + + memset(¶ms, 0, sizeof(params)); + params.cArgs = 2; + params.cNamedArgs = 0; + params.rgvarg = arg; + V_VT(&arg[0]) = VT_I4; + V_I4(&arg[0]) = 1252; + V_VT(&arg[1]) = VT_R8; + V_R8(&arg[1]) = 2.0; /* WinHttpRequestOption_URLCodePage */ + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, + DISPATCH_METHOD, ¶ms, NULL, NULL, &err); + ok(hr == S_OK, "error %#x\n", hr); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret)); + + memset(¶ms, 0, sizeof(params)); + params.cArgs = 2; + params.cNamedArgs = 0; + params.rgvarg = arg; + V_VT(&arg[0]) = VT_I4; + V_I4(&arg[0]) = 1252; + V_VT(&arg[1]) = VT_R8; + V_R8(&arg[1]) = 2.0; /* WinHttpRequestOption_URLCodePage */ + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, + DISPATCH_METHOD | DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, &err); + ok(hr == S_OK, "error %#x\n", hr); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret)); + + memset(¶ms, 0, sizeof(params)); + params.cArgs = 2; + params.cNamedArgs = 0; + params.rgvarg = arg; + V_VT(&arg[0]) = VT_I4; + V_I4(&arg[0]) = 1252; + V_VT(&arg[1]) = VT_R8; + V_R8(&arg[1]) = 2.0; /* WinHttpRequestOption_URLCodePage */ + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, + DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, &err); + ok(hr == S_OK, "error %#x\n", hr); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == 1252, "expected 1252, got %d\n", V_I4(&ret)); + + memset(¶ms, 0, sizeof(params)); + params.cArgs = 2; + params.cNamedArgs = 0; + params.rgvarg = arg; + V_VT(&arg[0]) = VT_BSTR; + utf8 = SysAllocString(utf8W); + V_BSTR(&arg[0]) = utf8; + V_VT(&arg[1]) = VT_R8; + V_R8(&arg[1]) = 2.0; /* WinHttpRequestOption_URLCodePage */ + hr = IWinHttpRequest_Invoke(request, id, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, NULL, NULL, &err); + ok(hr == S_OK, "error %#x\n", hr); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == 1252, "expected 1252, got %d\n", V_I4(&ret)); + + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, id, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, &err); + ok(hr == S_OK, "error %#x\n", hr); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == 1252, "expected 1252, got %d\n", V_I4(&ret)); + + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, id, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err); + ok(hr == S_OK, "error %#x\n", hr); + + request_get_property(request, WinHttpRequestOption_URLCodePage, &ret); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret)); + + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + + hr = IWinHttpRequest_Invoke(request, 255, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, NULL); + ok(hr == DISP_E_MEMBERNOTFOUND, "error %#x\n", hr); + + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_IUnknown, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err); + ok(hr == DISP_E_UNKNOWNINTERFACE, "error %#x\n", hr); + + VariantInit(&ret); +if (0) /* crashes */ + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, NULL, &ret, NULL, &err); + + params.cArgs = 1; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err); + ok(hr == DISP_E_TYPEMISMATCH, "error %#x\n", hr); + + VariantInit(&arg[2]); + params.cArgs = 3; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err); +todo_wine + ok(hr == S_OK, "error %#x\n", hr); + + VariantInit(&arg[0]); + VariantInit(&arg[1]); + VariantInit(&arg[2]); + + params.cArgs = 1; + V_VT(&arg[0]) = VT_I4; + V_I4(&arg[0]) = WinHttpRequestOption_URLCodePage; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + + V_VT(&ret) = 0xdead; + V_I4(&ret) = 0xbeef; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_METHOD|DISPATCH_PROPERTYGET, ¶ms, &ret, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret)); + + V_VT(&ret) = 0xdead; + V_I4(&ret) = 0xbeef; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret)); + + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_METHOD|DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + + V_VT(&ret) = 0xdead; + V_I4(&ret) = 0xbeef; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, 0, ¶ms, &ret, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + ok(V_VT(&ret) == VT_EMPTY, "expected VT_EMPTY, got %d\n", V_VT(&ret)); + ok(V_I4(&ret) == 0xbeef || V_I4(&ret) == 0 /* Win8 */, "expected 0xdead, got %d\n", V_I4(&ret)); + + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, 0, ¶ms, NULL, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_IUnknown, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL); + ok(hr == DISP_E_UNKNOWNINTERFACE, "error %#x\n", hr); + + params.cArgs = 2; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL); +todo_wine + ok(hr == S_OK, "error %#x\n", hr); + + params.cArgs = 0; + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL); + ok(hr == DISP_E_PARAMNOTFOUND, "error %#x\n", hr); + + SysFreeString(utf8); + + params.cArgs = 1; + V_VT(&arg[0]) = VT_I4; + V_I4(&arg[0]) = AutoLogonPolicy_Never; + VariantInit(&ret); + hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY, &IID_NULL, 0, + DISPATCH_METHOD, ¶ms, &ret, NULL, NULL); + ok(hr == S_OK, "error %#x\n", hr); + + IWinHttpRequest_Release(request); + CoUninitialize(); } @@ -3465,6 +3847,7 @@ } else { + ok( error == ERROR_SUCCESS, "got %u\n", error ); trace("%s\n", wine_dbgstr_w(url)); GlobalFree( url ); } @@ -3484,8 +3867,12 @@ ok( !ret, "expected failure\n" ); ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + SetLastError(0xdeadbeef); ret = WinHttpGetIEProxyConfigForCurrentUser( &cfg ); + error = GetLastError(); ok( ret, "expected success\n" ); + ok( error == ERROR_SUCCESS || broken(error == ERROR_NO_TOKEN) /* < win7 */, "got %u\n", error ); + trace("IEProxy.AutoDetect=%d\n", cfg.fAutoDetect); trace("IEProxy.AutoConfigUrl=%s\n", wine_dbgstr_w(cfg.lpszAutoConfigUrl)); trace("IEProxy.Proxy=%s\n", wine_dbgstr_w(cfg.lpszProxy)); @@ -3572,9 +3959,12 @@ options.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DNS_A; memset( &info, 0, sizeof(info) ); + SetLastError(0xdeadbeef); ret = WinHttpGetProxyForUrl( session, urlW, &options, &info ); + error = GetLastError(); if (ret) { + ok( error == ERROR_SUCCESS, "got %u\n", error ); trace("Proxy.AccessType=%u\n", info.dwAccessType); trace("Proxy.Proxy=%s\n", wine_dbgstr_w(info.lpszProxy)); trace("Proxy.ProxyBypass=%s\n", wine_dbgstr_w(info.lpszProxyBypass)); @@ -3604,7 +3994,7 @@ static const WCHAR verb[] = {'/','t','e','s','t','c','h','u','n','k','e','d',0}; static const WCHAR chunked[] = {'c','h','u','n','k','e','d',0}; WCHAR header[32]; - DWORD len; + DWORD len, err; HINTERNET ses, con = NULL, req = NULL; BOOL ret; @@ -3623,7 +4013,8 @@ if (!req) goto done; ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); - if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + err = GetLastError(); + if (!ret && (err == ERROR_WINHTTP_CANNOT_CONNECT || err == ERROR_WINHTTP_TIMEOUT)) { skip("connection failed, skipping\n"); goto done; @@ -3702,6 +4093,7 @@ test_resolve_timeout(); test_credentials(); test_IWinHttpRequest(); + test_IWinHttpRequest_Invoke(); test_WinHttpDetectAutoProxyConfigUrl(); test_WinHttpGetIEProxyConfigForCurrentUser(); test_WinHttpGetProxyForUrl();
9 years, 1 month
1
0
0
0
[akhaldi] 70007: [WINHTTP] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:13:38 2015 New Revision: 70007 URL:
http://svn.reactos.org/svn/reactos?rev=70007&view=rev
Log: [WINHTTP] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/reactos/dll/win32/winhttp/request.c trunk/reactos/dll/win32/winhttp/session.c trunk/reactos/dll/win32/winhttp/url.c trunk/reactos/dll/win32/winhttp/winhttp_private.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/winhttp/request.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/request.…
============================================================================== --- trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] Sun Nov 22 10:13:38 2015 @@ -28,6 +28,7 @@ #include <assert.h> #include <winuser.h> #include <httprequest.h> +#include <httprequestid.h> #include "inet_ntop.c" @@ -206,6 +207,11 @@ } case WAIT_OBJECT_0 + 1: TRACE("exiting\n"); + CloseHandle( request->task_cancel ); + CloseHandle( request->task_wait ); + request->task_cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection( &request->task_cs ); + request->hdr.vtbl->destroy( &request->hdr ); return 0; default: @@ -525,6 +531,7 @@ ret = add_request_headers( request, headers, len, flags ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -655,11 +662,8 @@ if (!(p = headers)) return FALSE; for (len = 0; *p; p++) if (*p != '\r') len++; - if (!buffer || (len + 1) * sizeof(WCHAR) > *buflen) - { - len++; + if (!buffer || len * sizeof(WCHAR) > *buflen) set_last_error( ERROR_INSUFFICIENT_BUFFER ); - } else { for (p = headers, q = buffer; *p; p++, q++) @@ -671,8 +675,8 @@ p++; /* skip '\n' */ } } - *q = 0; TRACE("returning data: %s\n", debugstr_wn(buffer, len)); + if (len) len--; ret = TRUE; } *buflen = len * sizeof(WCHAR); @@ -832,6 +836,7 @@ ret = query_headers( request, level, name, buffer, buflen, index ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1036,7 +1041,7 @@ return FALSE; } } - if (!netconn_secure_connect( &request->netconn, connect->servername )) + if (!netconn_secure_connect( &request->netconn, connect->hostname )) { netconn_close( &request->netconn ); heap_free( addressW ); @@ -1249,6 +1254,7 @@ ret = send_request( request, headers, headers_len, optional, optional_len, total_len, context, FALSE ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1373,6 +1379,7 @@ } release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1827,6 +1834,7 @@ ret = set_credentials( request, target, scheme, username, password ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -2072,19 +2080,17 @@ static const WCHAR crlf[] = {'\r','\n',0}; char buffer[MAX_REPLY_LEN]; - DWORD buflen, len, offset, received_len, crlf_len = 2; /* strlenW(crlf) */ + DWORD buflen, len, offset, crlf_len = 2; /* strlenW(crlf) */ char *status_code, *status_text; WCHAR *versionW, *status_textW, *raw_headers; WCHAR status_codeW[4]; /* sizeof("nnn") */ if (!netconn_connected( &request->netconn )) return FALSE; - received_len = 0; do { buflen = MAX_REPLY_LEN; if (!read_line( request, buffer, &buflen )) return FALSE; - received_len += buflen; /* first line should look like 'HTTP/1.x nnn OK' where nnn is the status code */ if (!(status_code = strchr( buffer, ' ' ))) return FALSE; @@ -2137,8 +2143,7 @@ buflen = MAX_REPLY_LEN; if (!read_line( request, buffer, &buflen )) return TRUE; - received_len += buflen; - if (!*buffer) break; + if (!*buffer) buflen = 1; while (len - offset < buflen + crlf_len) { @@ -2146,6 +2151,11 @@ len *= 2; if (!(tmp = heap_realloc( raw_headers, len * sizeof(WCHAR) ))) return FALSE; request->raw_headers = raw_headers = tmp; + } + if (!*buffer) + { + memcpy( raw_headers + offset, crlf, sizeof(crlf) ); + break; } MultiByteToWideChar( CP_ACP, 0, buffer, buflen, raw_headers + offset, buflen ); @@ -2469,6 +2479,7 @@ ret = receive_response( request, FALSE ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -2540,6 +2551,7 @@ ret = query_data_available( request, available, FALSE ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -2589,6 +2601,7 @@ ret = read_data( request, buffer, to_read, read, FALSE ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -2660,6 +2673,7 @@ ret = write_data( request, buffer, to_write, written, FALSE ); release_object( &request->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -2700,6 +2714,7 @@ LONG receive_timeout; WINHTTP_PROXY_INFO proxy; BOOL async; + UINT url_codepage; }; static inline struct winhttp_request *impl_from_IWinHttpRequest( IWinHttpRequest *iface ) @@ -2921,6 +2936,48 @@ TRACE("%p, %d, %s, %d, %d, %p, %p, %p, %p\n", request, member, debugstr_guid(riid), lcid, flags, params, result, excep_info, arg_err); + + if (!IsEqualIID( riid, &IID_NULL )) return DISP_E_UNKNOWNINTERFACE; + + if (member == DISPID_HTTPREQUEST_OPTION) + { + VARIANT ret_value, option; + UINT err_pos; + + if (!result) result = &ret_value; + if (!arg_err) arg_err = &err_pos; + + VariantInit( &option ); + VariantInit( result ); + + if (!flags) return S_OK; + + if (flags == DISPATCH_PROPERTYPUT) + { + hr = DispGetParam( params, 0, VT_I4, &option, arg_err ); + if (FAILED(hr)) return hr; + + hr = IWinHttpRequest_put_Option( &request->IWinHttpRequest_iface, V_I4( &option ), params->rgvarg[0] ); + if (FAILED(hr)) + WARN("put_Option(%d) failed: %x\n", V_I4( &option ), hr); + return hr; + } + else if (flags & (DISPATCH_PROPERTYGET | DISPATCH_METHOD)) + { + hr = DispGetParam( params, 0, VT_I4, &option, arg_err ); + if (FAILED(hr)) return hr; + + hr = IWinHttpRequest_get_Option( &request->IWinHttpRequest_iface, V_I4( &option ), result ); + if (FAILED(hr)) + WARN("get_Option(%d) failed: %x\n", V_I4( &option ), hr); + return hr; + } + + FIXME("unsupported flags %x\n", flags); + return E_NOTIMPL; + } + + /* fallback to standard implementation */ hr = get_typeinfo( IWinHttpRequest_tid, &typeinfo ); if (SUCCEEDED(hr)) @@ -3048,6 +3105,7 @@ request->connect_timeout = 60000; request->send_timeout = 30000; request->receive_timeout = 30000; + request->url_codepage = CP_UTF8; VariantInit( &request->data ); request->state = REQUEST_STATE_INITIALIZED; } @@ -3068,6 +3126,7 @@ request->bytes_read = 0; request->error = ERROR_SUCCESS; request->async = FALSE; + request->url_codepage = CP_UTF8; VariantClear( &request->data ); request->state = REQUEST_STATE_INITIALIZED; } @@ -3973,8 +4032,25 @@ WinHttpRequestOption option, VARIANT *value ) { - FIXME("\n"); - return E_NOTIMPL; + struct winhttp_request *request = impl_from_IWinHttpRequest( iface ); + HRESULT hr = S_OK; + + TRACE("%p, %u, %p\n", request, option, value); + + EnterCriticalSection( &request->cs ); + switch (option) + { + case WinHttpRequestOption_URLCodePage: + V_VT( value ) = VT_I4; + V_I4( value ) = request->url_codepage; + break; + default: + FIXME("unimplemented option %u\n", option); + hr = E_NOTIMPL; + break; + } + LeaveCriticalSection( &request->cs ); + return hr; } static HRESULT WINAPI winhttp_request_put_Option( @@ -3996,6 +4072,28 @@ request->disable_feature &= ~WINHTTP_DISABLE_REDIRECTS; else request->disable_feature |= WINHTTP_DISABLE_REDIRECTS; + break; + } + case WinHttpRequestOption_URLCodePage: + { + static const WCHAR utf8W[] = {'u','t','f','-','8',0}; + VARIANT cp; + + VariantInit( &cp ); + hr = VariantChangeType( &cp, &value, 0, VT_UI4 ); + if (SUCCEEDED( hr )) + { + request->url_codepage = V_UI4( &cp ); + TRACE("URL codepage: %u\n", request->url_codepage); + } + else if (V_VT( &value ) == VT_BSTR && !strcmpiW( V_BSTR( &value ), utf8W )) + { + TRACE("URL codepage: UTF-8\n"); + request->url_codepage = CP_UTF8; + hr = S_OK; + } + else + FIXME("URL codepage %s is not recognized\n", debugstr_variant( &value )); break; } default: @@ -4151,6 +4249,7 @@ request->state = REQUEST_STATE_UNINITIALIZED; request->proxy.lpszProxy = NULL; request->proxy.lpszProxyBypass = NULL; + request->url_codepage = CP_UTF8; InitializeCriticalSection( &request->cs ); request->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": winhttp_request.cs"); Modified: trunk/reactos/dll/win32/winhttp/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/session.…
============================================================================== --- trunk/reactos/dll/win32/winhttp/session.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/session.c [iso-8859-1] Sun Nov 22 10:13:38 2015 @@ -70,6 +70,8 @@ TRACE("%p\n", session); + if (session->unload_event) SetEvent( session->unload_event ); + LIST_FOR_EACH_SAFE( item, next, &session->cookie_cache ) { domain = LIST_ENTRY( item, domain_t, entry ); @@ -173,6 +175,10 @@ return TRUE; case WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH: FIXME("WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH: 0x%x\n", *(DWORD *)buffer); + return TRUE; + case WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT: + TRACE("WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT: %p\n", *(HANDLE *)buffer); + session->unload_event = *(HANDLE *)buffer; return TRUE; default: FIXME("unimplemented option %u\n", option); @@ -250,6 +256,7 @@ end: release_object( &session->hdr ); TRACE("returning %p\n", handle); + if (handle) set_last_error( ERROR_SUCCESS ); return handle; } @@ -526,6 +533,7 @@ release_object( &connect->hdr ); release_object( &session->hdr ); TRACE("returning %p\n", hconnect); + if (hconnect) set_last_error( ERROR_SUCCESS ); return hconnect; } @@ -541,13 +549,13 @@ if (request->task_thread) { + /* Signal to the task proc to quit. It will call + this again when it does. */ + HANDLE thread = request->task_thread; + request->task_thread = 0; SetEvent( request->task_cancel ); - WaitForSingleObject( request->task_thread, INFINITE ); - CloseHandle( request->task_thread ); - CloseHandle( request->task_cancel ); - CloseHandle( request->task_wait ); - request->task_cs.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &request->task_cs ); + CloseHandle( thread ); + return; } release_object( &request->connect->hdr ); @@ -1101,6 +1109,7 @@ release_object( &request->hdr ); release_object( &connect->hdr ); TRACE("returning %p\n", hrequest); + if (hrequest) set_last_error( ERROR_SUCCESS ); return hrequest; } @@ -1120,6 +1129,7 @@ } release_object( hdr ); free_handle( handle ); + set_last_error( ERROR_SUCCESS ); return TRUE; } @@ -1180,6 +1190,7 @@ ret = query_option( hdr, option, buffer, buflen ); release_object( hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1238,6 +1249,7 @@ ret = set_option( hdr, option, buffer, buflen ); release_object( hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1348,6 +1360,7 @@ if (!(urlW = strdupAW( system_url ))) return FALSE; *url = urlW; + set_last_error( ERROR_SUCCESS ); return TRUE; } if (flags & WINHTTP_AUTO_DETECT_TYPE_DHCP) @@ -1408,6 +1421,7 @@ set_last_error( ERROR_WINHTTP_AUTODETECTION_FAILED ); *url = NULL; } + else set_last_error( ERROR_SUCCESS ); return ret; } @@ -1575,6 +1589,7 @@ info->lpszProxy = NULL; info->lpszProxyBypass = NULL; } + set_last_error( ERROR_SUCCESS ); return TRUE; } @@ -1657,6 +1672,7 @@ GlobalFree( config->lpszProxyBypass ); config->lpszProxyBypass = NULL; } + else set_last_error( ERROR_SUCCESS ); return ret; } @@ -1841,6 +1857,7 @@ done: GlobalFree( detected_pac_url ); release_object( &session->hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1948,6 +1965,7 @@ } RegCloseKey( key ); } + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -1972,6 +1990,7 @@ hdr->notify_mask = flags; release_object( hdr ); + set_last_error( ERROR_SUCCESS ); return ret; } @@ -2019,8 +2038,6 @@ if (netconn_set_timeout( &request->netconn, TRUE, send )) ret = FALSE; if (netconn_set_timeout( &request->netconn, FALSE, receive )) ret = FALSE; } - - release_object( &request->hdr ); break; case WINHTTP_HANDLE_TYPE_SESSION: @@ -2038,10 +2055,11 @@ break; default: - release_object( hdr ); set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE ); - return FALSE; - } + ret = FALSE; + } + release_object( hdr ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -2064,7 +2082,11 @@ TRACE("%p, %p\n", time, string); - if (!time || !string) return FALSE; + if (!time || !string) + { + set_last_error( ERROR_INVALID_PARAMETER ); + return FALSE; + } sprintfW( string, format, wkday[time->wDayOfWeek], @@ -2075,6 +2097,7 @@ time->wMinute, time->wSecond ); + set_last_error( ERROR_SUCCESS ); return TRUE; } @@ -2089,7 +2112,11 @@ TRACE("%s, %p\n", debugstr_w(string), time); - if (!string || !time) return FALSE; + if (!string || !time) + { + set_last_error( ERROR_INVALID_PARAMETER ); + return FALSE; + } /* Windows does this too */ GetSystemTime( time ); @@ -2097,6 +2124,8 @@ /* Convert an RFC1123 time such as 'Fri, 07 Jan 2005 12:06:35 GMT' into * a SYSTEMTIME structure. */ + + set_last_error( ERROR_SUCCESS ); while (*s && !isalphaW( *s )) s++; if (s[0] == '\0' || s[1] == '\0' || s[2] == '\0') return TRUE; Modified: trunk/reactos/dll/win32/winhttp/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/url.c?re…
============================================================================== --- trunk/reactos/dll/win32/winhttp/url.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/url.c [iso-8859-1] Sun Nov 22 10:13:38 2015 @@ -291,6 +291,7 @@ if (ret) uc->nScheme = scheme; heap_free( url_decoded ); heap_free( url_escaped ); + if (ret) set_last_error( ERROR_SUCCESS ); return ret; } @@ -509,5 +510,6 @@ } } *url = 0; + set_last_error( ERROR_SUCCESS ); return TRUE; } Modified: trunk/reactos/dll/win32/winhttp/winhttp_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/winhttp_…
============================================================================== --- trunk/reactos/dll/win32/winhttp/winhttp_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/winhttp_private.h [iso-8859-1] Sun Nov 22 10:13:38 2015 @@ -125,6 +125,7 @@ LPWSTR proxy_username; LPWSTR proxy_password; struct list cookie_cache; + HANDLE unload_event; } session_t; typedef struct Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Nov 22 10:13:38 2015 @@ -204,7 +204,7 @@ reactos/dll/win32/windowscodecsext # Synced to WineStaging-1.7.47 reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.7.47 reactos/dll/win32/wing32 # Synced to WineStaging-1.7.55 -reactos/dll/win32/winhttp # Synced to WineStaging-1.7.47 +reactos/dll/win32/winhttp # Synced to WineStaging-1.7.55 reactos/dll/win32/wininet # Synced to WineStaging-1.7.47 reactos/dll/win32/winmm # Forked at Wine-20050628 reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
9 years, 1 month
1
0
0
0
[dreimer] 70006: [TRANSLATIONS] Update German translations
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Nov 22 10:12:31 2015 New Revision: 70006 URL:
http://svn.reactos.org/svn/reactos?rev=70006&view=rev
Log: [TRANSLATIONS] Update German translations Modified: trunk/reactos/base/applications/notepad/lang/de-DE.rc trunk/reactos/dll/win32/shell32/lang/de-DE.rc trunk/reactos/dll/win32/shimgvw/lang/de-DE.rc Modified: trunk/reactos/base/applications/notepad/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/notepad/lang/de-DE.rc [iso-8859-1] Sun Nov 22 10:12:31 2015 @@ -184,5 +184,5 @@ STRING_LINE_COLUMN "Zeile %d, Spalte %d" STRING_PRINTERROR "Die Datei '%s' kann nicht gedruckt werden.\n\nStellen Sie sicher, dass der Drucker angeschlossen und richtig konfiguriert ist." - STRING_TEXT_DOCUMENT "Text Document" + STRING_TEXT_DOCUMENT "Textdokument" END Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] Sun Nov 22 10:12:31 2015 @@ -793,8 +793,8 @@ IDS_ICO_FILE "Icon" IDS_INI_FILE "Konfigurationseinstellungen" IDS_LNK_FILE "Verknüpfung" - IDS_PIF_FILE "NT VDM Program Information File" - IDS_SCR_FILE "Screen Saver" + IDS_PIF_FILE "NTVDM Programminformationsdatei" + IDS_SCR_FILE "Bildschirmschoner" IDS_SYS_FILE "Systemdatei" IDS_VXD_FILE "Virtueller Gerätetreiber" Modified: trunk/reactos/dll/win32/shimgvw/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shimgvw/lang/de-…
============================================================================== --- trunk/reactos/dll/win32/shimgvw/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shimgvw/lang/de-DE.rc [iso-8859-1] Sun Nov 22 10:12:31 2015 @@ -18,11 +18,11 @@ STRINGTABLE BEGIN - // IDS_EMF_FILE "EMF Image" - IDS_GIF_FILE "GIF Image" - IDS_JPG_FILE "JPEG Image" - IDS_BMP_FILE "Bitmap Image" - IDS_PNG_FILE "PNG Image" - // IDS_TIF_FILE "TIF Image" - // IDS_WMF_FILE "WMF Image" + // IDS_EMF_FILE "EMF-Bilddatei" + IDS_GIF_FILE "GIF-Bilddatei" + IDS_JPG_FILE "JPEG-Bilddatei" + IDS_BMP_FILE "Bitmap-Bilddatei" + IDS_PNG_FILE "PNG-Bilddatei" + // IDS_TIF_FILE "TIF-Bilddatei" + // IDS_WMF_FILE "WMF-Bilddatei" END
9 years, 1 month
1
0
0
0
[akhaldi] 70005: [INCLUDES/WINE] Update winternl.h. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 22 10:11:14 2015 New Revision: 70005 URL:
http://svn.reactos.org/svn/reactos?rev=70005&view=rev
Log: [INCLUDES/WINE] Update winternl.h. CORE-10536 Modified: trunk/reactos/include/reactos/wine/winternl.h Modified: trunk/reactos/include/reactos/wine/winternl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winte…
============================================================================== --- trunk/reactos/include/reactos/wine/winternl.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/winternl.h [iso-8859-1] Sun Nov 22 10:11:14 2015 @@ -382,7 +382,7 @@ PVOID Spare4; /* f7c/1750 */ PVOID ReservedForOle; /* f80/1758 */ ULONG WaitingOnLoaderLock; /* f84/1760 */ - PVOID Reserved5[3]; /* f88/1768 */ + PVOID Reserved5[3]; /* f88/1768 used for wineserver shared memory */ PVOID *TlsExpansionSlots; /* f94/1780 */ ULONG ImpersonationLocale; /* f98/1788 */ ULONG IsImpersonating; /* f9c/178c */ @@ -441,17 +441,23 @@ FileIdBothDirectoryInformation, FileIdFullDirectoryInformation, FileValidDataLengthInformation, - FileShortNameInformation = 40, - /* 41, 42, 43 undocumented */ - FileSfioReserveInformation = 44, - FileSfioVolumeInformation = 45, - FileHardLinkInformation = 46, - /* 47 undocumented */ - FileNormalizedNameInformation = 48, - /* 49 undocumented */ - FileIdGlobalTxDirectoryInformation = 50, - /* 51, 52, 53 undocumented */ - FileStandardLinkInformation = 54, + FileShortNameInformation, + FileIoCompletionNotificationInformation, + FileIoStatusBlockRangeInformation, + FileIoPriorityHintInformation, + FileSfioReserveInformation, + FileSfioVolumeInformation, + FileHardLinkInformation, + FileProcessIdsUsingFileInformation, + FileNormalizedNameInformation, + FileNetworkPhysicalNameInformation, + FileIdGlobalTxDirectoryInformation, + FileIsRemoteDeviceInformation, + FileAttributeCacheInformation, + FileNumaNodeInformation, + FileStandardLinkInformation, + FileRemoteProtocolInformation, + FileReplaceCompletionInformation, FileMaximumInformation } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; @@ -577,6 +583,13 @@ WCHAR FileName[1]; } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION; +typedef struct _FILE_LINK_INFORMATION { + BOOLEAN ReplaceIfExists; + HANDLE RootDirectory; + ULONG FileNameLength; + WCHAR FileName[1]; +} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION; + typedef struct _FILE_NAMES_INFORMATION { ULONG NextEntryOffset; ULONG FileIndex; @@ -671,6 +684,11 @@ ULONG NamedPipeEnd; } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; +#define FILE_PIPE_DISCONNECTED_STATE 0x01 +#define FILE_PIPE_LISTENING_STATE 0x02 +#define FILE_PIPE_CONNECTED_STATE 0x03 +#define FILE_PIPE_CLOSING_STATE 0x04 + typedef struct _FILE_ALL_INFORMATION { FILE_BASIC_INFORMATION BasicInformation; FILE_STANDARD_INFORMATION StandardInformation; @@ -699,7 +717,12 @@ KeyBasicInformation, KeyNodeInformation, KeyFullInformation, - KeyNameInformation + KeyNameInformation, + KeyCachedInformation, + KeyFlagsInformation, + KeyVirtualizationInformation, + KeyHandleTagsInformation, + MaxKeyInfoClass } KEY_INFORMATION_CLASS; typedef enum _KEY_VALUE_INFORMATION_CLASS { @@ -862,6 +885,22 @@ ThreadSetTlsArrayAddress, ThreadIsIoPending, ThreadHideFromDebugger, + ThreadBreakOnTermination, + ThreadSwitchLegacyState, + ThreadIsTerminated, + ThreadLastSystemCall, + ThreadIoPriority, + ThreadCycleTime, + ThreadPagePriority, + ThreadActualBasePriority, + ThreadTebInformation, + ThreadCSwitchMon, + ThreadCSwitchPmu, + ThreadWow64Context, + ThreadGroupInformation, + ThreadUmsInformation, + ThreadCounterProfiling, + ThreadIdealProcessorEx, MaxThreadInfoClass } THREADINFOCLASS; @@ -1010,6 +1049,18 @@ ULONG NameLength; WCHAR Name[1]; } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION; + +typedef struct _KEY_CACHED_INFORMATION +{ + LARGE_INTEGER LastWriteTime; + ULONG TitleIndex; + ULONG SubKeys; + ULONG MaxNameLen; + ULONG Values; + ULONG MaxValueNameLen; + ULONG MaxValueDataLen; + ULONG NameLength; +} KEY_CACHED_INFORMATION, *PKEY_CACHED_INFORMATION; typedef struct _KEY_VALUE_ENTRY { @@ -2097,6 +2148,7 @@ NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG); NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG); +NTSYSAPI NTSTATUS WINAPI NtCreateKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,HANDLE,ULONG*); NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG); NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER); NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN); @@ -2132,6 +2184,7 @@ NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*); +NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void); NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG); NTSYSAPI ULONG WINAPI NtGetTickCount(VOID); NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*); @@ -2150,6 +2203,7 @@ NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI NtNotifyChangeDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN); +NTSYSAPI NTSTATUS WINAPI NtNotifyChangeMultipleKeys(HANDLE,ULONG,OBJECT_ATTRIBUTES*,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); NTSYSAPI NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *); NTSYSAPI NTSTATUS WINAPI NtOpenEventPair(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); @@ -2157,6 +2211,9 @@ NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *); +NTSYSAPI NTSTATUS WINAPI NtOpenKeyEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG); +NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransacted(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,HANDLE); +NTSYSAPI NTSTATUS WINAPI NtOpenKeyTransactedEx(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,HANDLE); NTSYSAPI NTSTATUS WINAPI NtOpenKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN); @@ -2225,6 +2282,7 @@ NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG); NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG); NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER); +NTSYSAPI NTSTATUS WINAPI NtRenameKey(HANDLE,UNICODE_STRING*); NTSYSAPI NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES); NTSYSAPI NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE); NTSYSAPI NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE); @@ -2256,7 +2314,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE); NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T); -NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY); +NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE); NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE); NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID); @@ -2472,6 +2530,8 @@ NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR); NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *); NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE); +NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *); +NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *); NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR); NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN); NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *); @@ -2594,6 +2654,7 @@ NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR); NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *); NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR); +NTSYSAPI BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR,ULONG,SECURITY_INFORMATION); NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL); NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID); NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID); @@ -2639,6 +2700,9 @@ UINT disposition, BOOLEAN check_case ); NTSYSAPI NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt ); +NTSYSAPI SIZE_T CDECL wine_uninterrupted_read_memory( const void *addr, void *buffer, SIZE_T size ); +NTSYSAPI SIZE_T CDECL wine_uninterrupted_write_memory( void *addr, const void *buffer, SIZE_T size ); + /*********************************************************************** * Inline functions
9 years, 1 month
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
46
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Results per page:
10
25
50
100
200