winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2017
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
632 discussions
Start a n
N
ew thread
Alex Henrie : ntdll: Implement ProcessVmCounters for Linux.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: 0b9b4335018a23f4ebde4701932780f1854fb4c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b9b4335018a23f4ebde47019…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Mar 20 22:55:37 2017 -0600 ntdll: Implement ProcessVmCounters for Linux. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit bf7a97e5d3482d1ee4130d716f02b870df804040) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/process.c | 28 ++++++++++++++++++++++++++++ dlls/ntdll/tests/info.c | 5 +---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index adff826..72376de 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -131,6 +131,34 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) #endif } +#elif defined(linux) + +static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) +{ + FILE *f; + char line[256]; + unsigned long value; + + f = fopen("/proc/self/status", "r"); + if (!f) return; + + while (fgets(line, sizeof(line), f)) + { + if (sscanf(line, "VmPeak: %lu", &value)) + pvmi->PeakVirtualSize = (ULONG64)value * 1024; + else if (sscanf(line, "VmSize: %lu", &value)) + pvmi->VirtualSize = (ULONG64)value * 1024; + else if (sscanf(line, "VmHWM: %lu", &value)) + pvmi->PeakWorkingSetSize = (ULONG64)value * 1024; + else if (sscanf(line, "VmRSS: %lu", &value)) + pvmi->WorkingSetSize = (ULONG64)value * 1024; + else if (sscanf(line, "VmSwap: %lu", &value)) + pvmi->PeakPagefileUsage = pvmi->PagefileUsage = (ULONG64)value * 1024; + } + + fclose(f); +} + #else static void fill_VM_COUNTERS(VM_COUNTERS* pvmi) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 448bc64..35e25af 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1078,10 +1078,7 @@ static void test_query_process_vm(void) /* Check if we have some return values */ trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize); - todo_wine - { - ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n"); - } + ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n"); } static void test_query_process_io(void)
1
0
0
0
Nikolay Sivov : dwrite: Make CreateFontFaceFromHdc() properly fail on unsupported font format.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: 9f0cb9c2cfb40e3d39d2fd19a1f4b2e72a62add2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f0cb9c2cfb40e3d39d2fd19a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 19 15:15:29 2017 +0300 dwrite: Make CreateFontFaceFromHdc() properly fail on unsupported font format. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0344c19692396dca80a98f02fa7f713cee12b344) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dwrite/gdiinterop.c | 13 +++++++------ dlls/dwrite/tests/font.c | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index 67fc4a0..5353810d 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -746,14 +746,15 @@ static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop1 *iface is_supported = FALSE; hr = IDWriteFontFile_Analyze(file, &is_supported, &filetype, &facetype, &facenum); - if (FAILED(hr) || !is_supported) { - IDWriteFontFile_Release(file); - return hr; + if (SUCCEEDED(hr)) { + if (is_supported) + /* Simulations flags values match DWRITE_FONT_SIMULATIONS */ + hr = IDWriteFactory4_CreateFontFace(This->factory, facetype, 1, &file, info.face_index, + info.simulations, fontface); + else + hr = DWRITE_E_FILEFORMAT; } - /* Simulations flags values match DWRITE_FONT_SIMULATIONS */ - hr = IDWriteFactory4_CreateFontFace(This->factory, facetype, 1, &file, info.face_index, info.simulations, - fontface); IDWriteFontFile_Release(file); return hr; } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index ba9866a..b5cb9b5 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -1,7 +1,7 @@ /* * Font related tests * - * Copyright 2012, 2014-2016 Nikolay Sivov for CodeWeavers + * Copyright 2012, 2014-2017 Nikolay Sivov for CodeWeavers * Copyright 2014 Aric Stewart for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -3344,6 +3344,7 @@ static void test_CreateFontFaceFromHdc(void) IDWriteFactory *factory; HFONT hfont, oldhfont; LOGFONTW logfont; + LOGFONTA lf; HRESULT hr; HDC hdc; @@ -3353,11 +3354,17 @@ static void test_CreateFontFaceFromHdc(void) hr = IDWriteFactory_GetGdiInterop(factory, &interop); ok(hr == S_OK, "got 0x%08x\n", hr); + /* Invalid HDC. */ fontface = (void*)0xdeadbeef; hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, NULL, &fontface); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); ok(fontface == NULL, "got %p\n", fontface); + fontface = (void *)0xdeadbeef; + hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, (HDC)0xdeadbeef, &fontface); + ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(fontface == NULL, "got %p\n", fontface); + memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight = 12; logfont.lfWidth = 12; @@ -3374,6 +3381,21 @@ static void test_CreateFontFaceFromHdc(void) ok(hr == S_OK, "got 0x%08x\n", hr); IDWriteFontFace_Release(fontface); DeleteObject(SelectObject(hdc, oldhfont)); + + /* Select bitmap font MS Sans Serif, format that's not supported by DirectWrite. */ + memset(&lf, 0, sizeof(lf)); + lf.lfHeight = -12; + strcpy(lf.lfFaceName, "MS Sans Serif"); + + hfont = CreateFontIndirectA(&lf); + oldhfont = SelectObject(hdc, hfont); + + fontface = (void *)0xdeadbeef; + hr = IDWriteGdiInterop_CreateFontFaceFromHdc(interop, hdc, &fontface); + ok(hr == DWRITE_E_FILEFORMAT || broken(hr == E_FAIL) /* Vista */, "got 0x%08x\n", hr); + ok(fontface == NULL, "got %p\n", fontface); + + DeleteObject(SelectObject(hdc, oldhfont)); DeleteDC(hdc); IDWriteGdiInterop_Release(interop);
1
0
0
0
Andrey Gusev : d3dx11: Add D3DX11FilterTexture stub.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: d79933bfab5ffb8aca85dd2426ef8b0b6bb91d64 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d79933bfab5ffb8aca85dd242…
Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Sun Apr 9 21:17:15 2017 +0300 d3dx11: Add D3DX11FilterTexture stub. Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0e2bbb210a5973341adc9c88943da6ecebb9d9bc) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3dx11_42/d3dx11_42.spec | 2 +- dlls/d3dx11_43/d3dx11_43.c | 7 +++++++ dlls/d3dx11_43/d3dx11_43.spec | 2 +- include/d3dx11tex.h | 23 +++++++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec index 815c162..12d4429 100644 --- a/dlls/d3dx11_42/d3dx11_42.spec +++ b/dlls/d3dx11_42/d3dx11_42.spec @@ -26,7 +26,7 @@ @ stub D3DX11CreateTextureFromResourceA @ stub D3DX11CreateTextureFromResourceW @ stub D3DX11CreateThreadPump -@ stub D3DX11FilterTexture +@ stdcall D3DX11FilterTexture(ptr ptr long long) d3dx11_43.D3DX11FilterTexture @ stub D3DX11GetImageInfoFromFileA @ stub D3DX11GetImageInfoFromFileW @ stdcall D3DX11GetImageInfoFromMemory(ptr long ptr ptr ptr) d3dx11_43.D3DX11GetImageInfoFromMemory diff --git a/dlls/d3dx11_43/d3dx11_43.c b/dlls/d3dx11_43/d3dx11_43.c index 201f3fb..4bf4998 100644 --- a/dlls/d3dx11_43/d3dx11_43.c +++ b/dlls/d3dx11_43/d3dx11_43.c @@ -61,6 +61,13 @@ BOOL WINAPI D3DX11CheckVersion(UINT d3dsdkversion, UINT d3dxsdkversion) return FALSE; } +HRESULT WINAPI D3DX11FilterTexture(ID3D11DeviceContext *context, ID3D11Resource *texture, UINT src_level, UINT filter) +{ + FIXME("context %p, texture %p, src_level %u, filter %#x stub!\n", context, texture, src_level, filter); + + return E_NOTIMPL; +} + HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, HRESULT *hresult) { diff --git a/dlls/d3dx11_43/d3dx11_43.spec b/dlls/d3dx11_43/d3dx11_43.spec index 452e513..a4e85af 100644 --- a/dlls/d3dx11_43/d3dx11_43.spec +++ b/dlls/d3dx11_43/d3dx11_43.spec @@ -26,7 +26,7 @@ @ stub D3DX11CreateTextureFromResourceA @ stub D3DX11CreateTextureFromResourceW @ stub D3DX11CreateThreadPump -@ stub D3DX11FilterTexture +@ stdcall D3DX11FilterTexture(ptr ptr long long) @ stub D3DX11GetImageInfoFromFileA @ stub D3DX11GetImageInfoFromFileW @ stdcall D3DX11GetImageInfoFromMemory(ptr long ptr ptr ptr) diff --git a/include/d3dx11tex.h b/include/d3dx11tex.h index 16b280a..584a3bd 100644 --- a/include/d3dx11tex.h +++ b/include/d3dx11tex.h @@ -21,6 +21,27 @@ #ifndef __D3DX11TEX_H__ #define __D3DX11TEX_H__ +typedef enum D3DX11_FILTER_FLAG +{ + D3DX11_FILTER_NONE = 0x00000001, + D3DX11_FILTER_POINT = 0x00000002, + D3DX11_FILTER_LINEAR = 0x00000003, + D3DX11_FILTER_TRIANGLE = 0x00000004, + D3DX11_FILTER_BOX = 0x00000005, + + D3DX11_FILTER_MIRROR_U = 0x00010000, + D3DX11_FILTER_MIRROR_V = 0x00020000, + D3DX11_FILTER_MIRROR_W = 0x00040000, + D3DX11_FILTER_MIRROR = 0x00070000, + + D3DX11_FILTER_DITHER = 0x00080000, + D3DX11_FILTER_DITHER_DIFFUSION = 0x00100000, + + D3DX11_FILTER_SRGB_IN = 0x00200000, + D3DX11_FILTER_SRGB_OUT = 0x00400000, + D3DX11_FILTER_SRGB = 0x00600000, +} D3DX11_FILTER_FLAG; + typedef enum D3DX11_IMAGE_FILE_FORMAT { D3DX11_IFF_BMP = 0, @@ -93,6 +114,8 @@ HRESULT WINAPI D3DX11CreateShaderResourceViewFromMemory(ID3D11Device *device, co HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *src_data, SIZE_T src_data_size, D3DX11_IMAGE_LOAD_INFO *loadinfo, ID3DX11ThreadPump *pump, ID3D11Resource **texture, HRESULT *hresult); +HRESULT WINAPI D3DX11FilterTexture(ID3D11DeviceContext *context, ID3D11Resource *texture, UINT src_level, UINT filter); + HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, HRESULT *hresult);
1
0
0
0
Jakub Bartmiński : regedit: Fall back to tree root on invalid path.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: 0d8afd40a5391204c312513baee38a6d60145499 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d8afd40a5391204c312513ba…
Author: Jakub Bartmiński <jakub.bartm(a)gmail.com> Date: Mon Apr 3 21:39:46 2017 +0200 regedit: Fall back to tree root on invalid path. Signed-off-by: Jakub Bartmiński <jakub.bartm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 9e35dd15454be28c487b0f1bebefbbe530b2aca4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/regedit/treeview.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index 07e9b41..f081c16 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -132,13 +132,16 @@ static LPWSTR get_path_component(LPCWSTR *lplpKeyName) { HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName) { TVITEMEXW tvi; WCHAR buf[261]; /* tree view has 260 character limitation on item name */ - HTREEITEM hItem, hOldItem; + HTREEITEM hRoot, hItem, hOldItem; + BOOL valid_path; buf[260] = '\0'; - hItem = (HTREEITEM)SendMessageW(hwndTV, TVM_GETNEXTITEM, TVGN_ROOT, 0); + hRoot = (HTREEITEM)SendMessageW(hwndTV, TVM_GETNEXTITEM, TVGN_ROOT, 0); + hItem = hRoot; SendMessageW(hwndTV, TVM_EXPAND, TVE_EXPAND, (LPARAM)hItem ); hItem = (HTREEITEM)SendMessageW(hwndTV, TVM_GETNEXTITEM, TVGN_CHILD, (LPARAM)hItem); hOldItem = hItem; + valid_path = FALSE; while(1) { LPWSTR lpItemName = get_path_component(&lpKeyName); @@ -150,6 +153,7 @@ HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName) { tvi.cchTextMax = 260; SendMessageW(hwndTV, TVM_GETITEMW, 0, (LPARAM) &tvi); if (!lstrcmpiW(tvi.pszText, lpItemName)) { + valid_path = TRUE; SendMessageW(hwndTV, TVM_EXPAND, TVE_EXPAND, (LPARAM)hItem ); if (!lpKeyName) { @@ -164,10 +168,10 @@ HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName) { } HeapFree(GetProcessHeap(), 0, lpItemName); if (!hItem) - return hOldItem; + return valid_path ? hOldItem : hRoot; } else - return hItem; + return valid_path ? hItem : hRoot; } }
1
0
0
0
Piotr Caban : msvcrt: Fix wide characters handling in wscanf functions.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: a97aa62ee7530eb2bd18e6a4460225fc18f2b5fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a97aa62ee7530eb2bd18e6a44…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Apr 3 12:45:58 2017 +0200 msvcrt: Fix wide characters handling in wscanf functions. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit e7f9b562b9da5aa1fbe369f9e57fe63d08cbb743) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/scanf.h | 16 ++++++++-------- dlls/msvcrt/tests/scanf.c | 12 +++++++++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index 0fa1e6f..2920b9b 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -68,11 +68,11 @@ #undef _EOF_ #define _EOF_ 0 #ifdef STRING_LEN -#ifdef WIDE_CHAR +#ifdef WIDE_SCANF #define _GETC_(file) (consumed==length ? '\0' : (consumed++, *file++)) -#else /* WIDE_CHAR */ +#else /* WIDE_SCANF */ #define _GETC_(file) (consumed==length ? '\0' : (consumed++, (unsigned char)*file++)) -#endif /* WIDE_CHAR */ +#endif /* WIDE_SCANF */ #define _UNGETC_(nch, file) do { file--; consumed--; } while(0) #define _LOCK_FILE_(file) do {} while(0) #define _UNLOCK_FILE_(file) do {} while(0) @@ -90,11 +90,11 @@ #endif /* SECURE */ #endif /* WIDE_SCANF */ #else /* STRING_LEN */ -#ifdef WIDE_CHAR +#ifdef WIDE_SCANF #define _GETC_(file) (consumed++, *file++) -#else /* WIDE_CHAR */ +#else /* WIDE_SCANF */ #define _GETC_(file) (consumed++, (unsigned char)*file++) -#endif /* WIDE_CHAR */ +#endif /* WIDE_SCANF */ #define _UNGETC_(nch, file) do { file--; consumed--; } while(0) #define _LOCK_FILE_(file) do {} while(0) #define _UNLOCK_FILE_(file) do {} while(0) @@ -685,7 +685,7 @@ _FUNCTION_ { * use %%." */ while ((nch!=_EOF_) && _ISSPACE_(nch)) nch = _GETC_(file); - if (nch==*format) { + if ((_CHAR_)nch == *format) { suppress = 1; /* whoops no field to be read */ st = 1; /* but we got what we expected */ nch = _GETC_(file); @@ -699,7 +699,7 @@ _FUNCTION_ { * a matching non-white-space character. */ else { /* check for character match */ - if (nch == (unsigned char)*format) { + if ((_CHAR_)nch == *format) { nch = _GETC_(file); } else break; } diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index ecb270b..1d1f28e 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -252,7 +252,7 @@ static void test_sscanf( void ) ok(!strcmp(buffer, "test"), "buf %s\n", buffer); ok(!strcmp(buffer1, "value\xda"), "buf %s\n", buffer1); - ret = sscanf("\x81test", "\x81%s", buffer); + ret = sscanf("\x81\x82test", "\x81%\x82%s", buffer); ok(ret == 1, "got %d\n", ret); ok(!strcmp(buffer, "test"), "buf = %s\n", buffer); } @@ -303,6 +303,8 @@ static void test_swscanf( void ) wchar_t buffer[100]; int result, ret; static const WCHAR formatd[] = {'%','d',0}; + const WCHAR format2[] = {'a',0x1234,'%',0x1234,'%','c',0}; + WCHAR c; /* check WEOF */ /* WEOF is an unsigned short -1 but swscanf returns int @@ -312,6 +314,14 @@ static void test_swscanf( void ) /* msvcrt returns 0 but should return -1 (later versions do) */ ok( ret == (short)WEOF || broken(ret == 0), "swscanf returns %x instead of %x\n", ret, WEOF ); + + buffer[0] = 'a'; + buffer[1] = 0x1234; + buffer[2] = 0x1234; + buffer[3] = 'b'; + ret = swscanf(buffer, format2, &c); + ok(ret == 1, "swscanf returned %d\n", ret); + ok(c == 'b', "c = %x\n", c); } START_TEST(scanf)
1
0
0
0
Piotr Caban : msvcrt: Fix handling of unsigned chars in scanf format.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: 10e6abd7b3f0e11f12fc6379fe69bba754700a3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10e6abd7b3f0e11f12fc6379f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Mar 31 15:02:48 2017 +0200 msvcrt: Fix handling of unsigned chars in scanf format. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 32bb8d9068ae5282b6b10734579aaa2d5195a5af) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/scanf.h | 2 +- dlls/msvcrt/tests/scanf.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index b2e6bd7..0fa1e6f 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -699,7 +699,7 @@ _FUNCTION_ { * a matching non-white-space character. */ else { /* check for character match */ - if (nch == *format) { + if (nch == (unsigned char)*format) { nch = _GETC_(file); } else break; } diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index 6cb85fa..ecb270b 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -251,6 +251,10 @@ static void test_sscanf( void ) ok(ret == 2, "got %d\n", ret); ok(!strcmp(buffer, "test"), "buf %s\n", buffer); ok(!strcmp(buffer1, "value\xda"), "buf %s\n", buffer1); + + ret = sscanf("\x81test", "\x81%s", buffer); + ok(ret == 1, "got %d\n", ret); + ok(!strcmp(buffer, "test"), "buf = %s\n", buffer); } static void test_sscanf_s(void)
1
0
0
0
Piotr Caban : msvcr120: Add fesetround implementation.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: ef3621ba6f6a06b8e69a390fc31591b5688d62cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef3621ba6f6a06b8e69a390fc…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Mar 31 16:05:35 2017 +0200 msvcr120: Add fesetround implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 92651b9850a4d030a675e7c5b6809235f831f9d7) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- .../api-ms-win-crt-runtime-l1-1-0.spec | 4 ++-- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120_app/msvcr120_app.spec | 4 ++-- dlls/msvcrt/math.c | 19 +++++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 4 ++-- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec index 6cea910..57c5ecf 100644 --- a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec +++ b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec @@ -90,11 +90,11 @@ @ stub feclearexcept @ cdecl fegetenv(ptr) ucrtbase.fegetenv @ stub fegetexceptflag -@ stub fegetround +@ cdecl fegetround() ucrtbase.fegetround @ stub feholdexcept @ cdecl fesetenv(ptr) ucrtbase.fesetenv @ stub fesetexceptflag -@ stub fesetround +@ cdecl fesetround(long) ucrtbase.fesetround @ stub fetestexcept @ cdecl perror(str) ucrtbase.perror @ stub quick_exit diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 2a9c42c..b6fafbb 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2146,14 +2146,14 @@ @ stub feclearexcept @ cdecl fegetenv(ptr) MSVCRT_fegetenv @ stub fegetexceptflag -@ stub fegetround +@ cdecl fegetround() MSVCRT_fegetround @ stub feholdexcept @ cdecl feof(ptr) MSVCRT_feof @ stub feraiseexcept @ cdecl ferror(ptr) MSVCRT_ferror @ cdecl fesetenv(ptr) MSVCRT_fesetenv @ stub fesetexceptflag -@ stub fesetround +@ cdecl fesetround(long) MSVCRT_fesetround @ stub fetestexcept @ stub feupdateenv @ cdecl fflush(ptr) MSVCRT_fflush diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index ae200c7..0799aca 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1812,14 +1812,14 @@ @ stub feclearexcept @ cdecl fegetenv(ptr) msvcr120.fegetenv @ stub fegetexceptflag -@ stub fegetround +@ cdecl fegetround() msvcr120.fegetround @ stub feholdexcept @ cdecl feof(ptr) msvcr120.feof @ stub feraiseexcept @ cdecl ferror(ptr) msvcr120.ferror @ cdecl fesetenv(ptr) msvcr120.fesetenv @ stub fesetexceptflag -@ stub fesetround +@ cdecl fesetround(long) msvcr120.fesetround @ stub fetestexcept @ stub feupdateenv @ cdecl fflush(ptr) msvcr120.fflush diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 857561b..437aa15 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -1232,6 +1232,25 @@ int CDECL __fpe_flt_rounds(void) } /********************************************************************* + * fegetround (MSVCR120.@) + */ +int CDECL MSVCRT_fegetround(void) +{ + return _controlfp(0, 0) & MSVCRT__RC_CHOP; +} + +/********************************************************************* + * fesetround (MSVCR120.@) + */ +int CDECL MSVCRT_fesetround(int round_mode) +{ + if (round_mode & (~MSVCRT__RC_CHOP)) + return 1; + _controlfp(round_mode, MSVCRT__RC_CHOP); + return 0; +} + +/********************************************************************* * _copysign (MSVCRT.@) */ double CDECL MSVCRT__copysign(double num, double sign) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index e57b6d6..a3dcf9c 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2289,13 +2289,13 @@ @ stub feclearexcept @ cdecl fegetenv(ptr) MSVCRT_fegetenv @ stub fegetexceptflag -@ stub fegetround +@ cdecl fegetround() MSVCRT_fegetround @ stub feholdexcept @ cdecl feof(ptr) MSVCRT_feof @ cdecl ferror(ptr) MSVCRT_ferror @ cdecl fesetenv(ptr) MSVCRT_fesetenv @ stub fesetexceptflag -@ stub fesetround +@ cdecl fesetround(long) MSVCRT_fesetround @ stub fetestexcept @ cdecl fflush(ptr) MSVCRT_fflush @ cdecl fgetc(ptr) MSVCRT_fgetc
1
0
0
0
Hans Leidekker : winhttp: Ignore unknown schemes in WinHttpQueryAuthSchemes.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: 1d5367666efda268502ee597e14c5bf9383e91f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d5367666efda268502ee597e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Apr 6 09:38:12 2017 +0200 winhttp: Ignore unknown schemes in WinHttpQueryAuthSchemes. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 6b6ffb399a113a5125098671c1660e4c2c419d81) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winhttp/request.c | 16 ++++++++++------ dlls/winhttp/tests/winhttp.c | 11 ++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index b2b72c7..e3c0fb4 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1315,7 +1315,7 @@ static DWORD auth_scheme_from_header( WCHAR *header ) static BOOL query_auth_schemes( request_t *request, DWORD level, LPDWORD supported, LPDWORD first ) { - DWORD index = 0; + DWORD index = 0, supported_schemes = 0, first_scheme = 0; BOOL ret = FALSE; for (;;) @@ -1336,15 +1336,19 @@ static BOOL query_auth_schemes( request_t *request, DWORD level, LPDWORD support } scheme = auth_scheme_from_header( buffer ); heap_free( buffer ); - if (!scheme) break; + if (!scheme) continue; - if (first && index == 1) - *first = *supported = scheme; - else - *supported |= scheme; + if (!first_scheme) first_scheme = scheme; + supported_schemes |= scheme; ret = TRUE; } + + if (ret) + { + *supported = supported_schemes; + *first = first_scheme; + } return ret; } diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 9777bd9..3818582 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -2521,7 +2521,7 @@ static void test_multi_authentication(int port) static const WCHAR multiauthW[] = {'/','m','u','l','t','i','a','u','t','h',0}; static const WCHAR getW[] = {'G','E','T',0}; HINTERNET ses, con, req; - DWORD supported = 10, first = 9, target = 8; + DWORD supported, first, target; BOOL ret; ses = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0); @@ -2540,11 +2540,12 @@ static void test_multi_authentication(int port) ret = WinHttpReceiveResponse(req, NULL); ok(ret, "expected success\n"); + supported = first = target = 0xdeadbeef; ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target); - todo_wine ok(ret, "expected success\n"); - todo_wine ok(supported == (WINHTTP_AUTH_SCHEME_BASIC | WINHTTP_AUTH_SCHEME_NTLM), "got %x\n", supported); - todo_wine ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target); - todo_wine ok(first == 1, "got %x\n", first); + ok(ret, "expected success\n"); + ok(supported == (WINHTTP_AUTH_SCHEME_BASIC | WINHTTP_AUTH_SCHEME_NTLM), "got %x\n", supported); + ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target); + ok(first == WINHTTP_AUTH_SCHEME_BASIC, "got %x\n", first); WinHttpCloseHandle(req); WinHttpCloseHandle(con);
1
0
0
0
Alistair Leslie-Hughes : winhttp/tests: Added multi Authenticate header test.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: 6021ae3ac2f14c9f52cb3bee27b8caa719f05f64 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6021ae3ac2f14c9f52cb3bee2…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Apr 5 09:20:54 2017 +0000 winhttp/tests: Added multi Authenticate header test. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit eb3cb338200a6fa7c301f9da43766d1d5118b637) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winhttp/tests/winhttp.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index f45ecef..9777bd9 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -2047,6 +2047,16 @@ static const char headmsg[] = "Content-Length: 100\r\n" "\r\n"; +static const char multiauth[] = +"HTTP/1.1 401 Unauthorized\r\n" +"Server: winetest\r\n" +"WWW-Authenticate: Bearer\r\n" +"WWW-Authenticate: Basic realm=\"placebo\"\r\n" +"WWW-Authenticate: NTLM\r\n" +"Content-Length: 10\r\n" +"Content-Type: text/plain\r\n" +"\r\n"; + static const char unauthorized[] = "Unauthorized"; static const char hello_world[] = "Hello World"; @@ -2156,6 +2166,10 @@ static DWORD CALLBACK server_thread(LPVOID param) else send(c, notokmsg, sizeof(notokmsg) - 1, 0); } + if (strstr(buffer, "GET /multiauth")) + { + send(c, multiauth, sizeof multiauth - 1, 0); + } if (strstr(buffer, "GET /cookie4")) { send(c, cookiemsg2, sizeof(cookiemsg2) - 1, 0); @@ -2502,6 +2516,41 @@ static void test_basic_authentication(int port) WinHttpCloseHandle(ses); } +static void test_multi_authentication(int port) +{ + static const WCHAR multiauthW[] = {'/','m','u','l','t','i','a','u','t','h',0}; + static const WCHAR getW[] = {'G','E','T',0}; + HINTERNET ses, con, req; + DWORD supported = 10, first = 9, target = 8; + BOOL ret; + + 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); + ok(con != NULL, "failed to open a connection %u\n", GetLastError()); + + req = WinHttpOpenRequest(con, getW, multiauthW, NULL, NULL, NULL, 0); + ok(req != NULL, "failed to open a request %u\n", GetLastError()); + + ret = WinHttpSendRequest(req, WINHTTP_NO_ADDITIONAL_HEADERS, 0, + WINHTTP_NO_REQUEST_DATA,0, 0, 0 ); + ok(ret, "expected success\n"); + + ret = WinHttpReceiveResponse(req, NULL); + ok(ret, "expected success\n"); + + ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target); + todo_wine ok(ret, "expected success\n"); + todo_wine ok(supported == (WINHTTP_AUTH_SCHEME_BASIC | WINHTTP_AUTH_SCHEME_NTLM), "got %x\n", supported); + todo_wine ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target); + todo_wine ok(first == 1, "got %x\n", first); + + WinHttpCloseHandle(req); + WinHttpCloseHandle(con); + WinHttpCloseHandle(ses); +} + static void test_no_headers(int port) { static const WCHAR no_headersW[] = {'/','n','o','_','h','e','a','d','e','r','s',0}; @@ -4301,6 +4350,7 @@ START_TEST (winhttp) test_head_request(si.port); test_not_modified(si.port); test_basic_authentication(si.port); + test_multi_authentication(si.port); test_bad_header(si.port); test_multiple_reads(si.port); test_cookies(si.port);
1
0
0
0
Hans Leidekker : winhttp: Cookie attributes are case-insensitive.
by Alexandre Julliard
20 Jul '17
20 Jul '17
Module: wine Branch: stable Commit: adff7d672595ec338f557dceecd1496e8529c389 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adff7d672595ec338f557dcee…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Feb 21 09:24:37 2017 +0100 winhttp: Cookie attributes are case-insensitive. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit be785746324e4bec0a35c0ce5ef132b2478bfd0d) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winhttp/cookie.c | 4 +-- dlls/winhttp/tests/winhttp.c | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/cookie.c b/dlls/winhttp/cookie.c index ec5dbc4..5ec4f0b 100644 --- a/dlls/winhttp/cookie.c +++ b/dlls/winhttp/cookie.c @@ -256,12 +256,12 @@ BOOL set_cookies( request_t *request, const WCHAR *cookies ) len = strlenW( p ); while (len && (attr = parse_attr( p, &used ))) { - if (!strcmpW( attr->name, domainW )) + if (!strcmpiW( attr->name, domainW )) { domain = attr; cookie_domain = attr->value; } - else if (!strcmpW( attr->name, pathW )) + else if (!strcmpiW( attr->name, pathW )) { path = attr; cookie_path = attr->value; diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 1b9ccc4..f45ecef 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -2011,6 +2011,11 @@ static const char cookiemsg[] = "Set-Cookie: NAME = value \r\n" "\r\n"; +static const char cookiemsg2[] = +"HTTP/1.1 200 OK\r\n" +"Set-Cookie: name2=value; Domain = localhost; Path=/cookie5;Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly; \r\n" +"\r\n"; + static const char nocontentmsg[] = "HTTP/1.1 204 No Content\r\n" "Server: winetest\r\n" @@ -2144,6 +2149,17 @@ static DWORD CALLBACK server_thread(LPVOID param) send(c, headmsg, sizeof headmsg - 1, 0); continue; } + if (strstr(buffer, "GET /cookie5")) + { + if (strstr(buffer, "Cookie: name2=value\r\n")) + send(c, okmsg, sizeof(okmsg) - 1, 0); + else + send(c, notokmsg, sizeof(notokmsg) - 1, 0); + } + if (strstr(buffer, "GET /cookie4")) + { + send(c, cookiemsg2, sizeof(cookiemsg2) - 1, 0); + } if (strstr(buffer, "GET /cookie3")) { if (strstr(buffer, "Cookie: name=value2; NAME=value; name=value\r\n") || @@ -2813,6 +2829,8 @@ static void test_cookies( int port ) static const WCHAR cookieW[] = {'/','c','o','o','k','i','e',0}; static const WCHAR cookie2W[] = {'/','c','o','o','k','i','e','2',0}; static const WCHAR cookie3W[] = {'/','c','o','o','k','i','e','3',0}; + static const WCHAR cookie4W[] = {'/','c','o','o','k','i','e','4',0}; + static const WCHAR cookie5W[] = {'/','c','o','o','k','i','e','5',0}; static const WCHAR cookieheaderW[] = {'C','o','o','k','i','e',':',' ','n','a','m','e','=','v','a','l','u','e','2','\r','\n',0}; HINTERNET ses, con, req; @@ -2923,6 +2941,48 @@ static void test_cookies( int port ) WinHttpCloseHandle( req ); WinHttpCloseHandle( con ); WinHttpCloseHandle( ses ); + + 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 ); + ok( con != NULL, "failed to open a connection %u\n", GetLastError() ); + + req = WinHttpOpenRequest( con, NULL, cookie4W, NULL, NULL, NULL, 0 ); + ok( req != NULL, "failed to open a request %u\n", GetLastError() ); + + ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); + ok( ret, "failed to send request %u\n", GetLastError() ); + + ret = WinHttpReceiveResponse( req, NULL ); + ok( ret, "failed to receive response %u\n", GetLastError() ); + + status = 0xdeadbeef; + size = sizeof(status); + ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); + ok( ret, "failed to query status code %u\n", GetLastError() ); + ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status ); + WinHttpCloseHandle( req ); + + req = WinHttpOpenRequest( con, NULL, cookie5W, NULL, NULL, NULL, 0 ); + ok( req != NULL, "failed to open a request %u\n", GetLastError() ); + + ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 ); + ok( ret, "failed to send request %u\n", GetLastError() ); + + ret = WinHttpReceiveResponse( req, NULL ); + ok( ret, "failed to receive response %u\n", GetLastError() ); + + status = 0xdeadbeef; + size = sizeof(status); + ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL ); + ok( ret, "failed to query status code %u\n", GetLastError() ); + ok( status == HTTP_STATUS_OK || broken(status == HTTP_STATUS_BAD_REQUEST) /* < win7 */, + "request failed unexpectedly %u\n", status ); + + WinHttpCloseHandle( req ); + WinHttpCloseHandle( con ); + WinHttpCloseHandle( ses ); } static void test_connection_info( int port )
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
64
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Results per page:
10
25
50
100
200