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
January 2015
----- 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
302 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Add a partial implementation of MsiProvideComponent.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: a884d98e99d92d218f53de566f20f9879926e26d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a884d98e99d92d218f53de566…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:26:31 2015 +0100 msi: Add a partial implementation of MsiProvideComponent. --- dlls/msi/msi.c | 86 +++++++++++++++++++++++++++++++++++++++++++ dlls/msi/msi.spec | 4 +- dlls/msi/tests/msi.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/msi.h | 4 ++ 4 files changed, 193 insertions(+), 2 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 6589ca9..afd92da 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -4198,6 +4198,92 @@ UINT WINAPI MsiInstallMissingComponentW(LPCWSTR szProduct, LPCWSTR szComponent, return ERROR_SUCCESS; } +UINT WINAPI MsiProvideComponentA( LPCSTR product, LPCSTR feature, LPCSTR component, DWORD mode, LPSTR buf, LPDWORD buflen ) +{ + WCHAR *productW = NULL, *componentW = NULL, *featureW = NULL, *bufW = NULL; + UINT r = ERROR_OUTOFMEMORY; + DWORD lenW; + int len; + + TRACE("%s, %s, %s, %x, %p, %p\n", debugstr_a(product), debugstr_a(component), debugstr_a(feature), mode, buf, buflen); + + if (product && !(productW = strdupAtoW( product ))) goto done; + if (feature && !(featureW = strdupAtoW( feature ))) goto done; + if (component && !(componentW = strdupAtoW( component ))) goto done; + + r = MsiProvideComponentW( productW, featureW, componentW, mode, NULL, &lenW ); + if (r != ERROR_SUCCESS) + goto done; + + if (!(bufW = msi_alloc( ++lenW * sizeof(WCHAR) ))) + { + r = ERROR_OUTOFMEMORY; + goto done; + } + + r = MsiProvideComponentW( productW, featureW, componentW, mode, bufW, &lenW ); + if (r != ERROR_SUCCESS) + goto done; + + len = WideCharToMultiByte( CP_ACP, 0, bufW, -1, NULL, 0, NULL, NULL ); + if (buf) + { + if (len > *buflen) + r = ERROR_MORE_DATA; + else + WideCharToMultiByte( CP_ACP, 0, bufW, -1, buf, *buflen, NULL, NULL ); + } + + *buflen = len - 1; + +done: + msi_free( productW ); + msi_free( featureW ); + msi_free( componentW ); + msi_free( bufW ); + return r; +} + +UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR component, DWORD mode, LPWSTR buf, LPDWORD buflen ) +{ + INSTALLSTATE state; + + TRACE("%s, %s, %s, %x, %p, %p\n", debugstr_w(product), debugstr_w(component), debugstr_w(feature), mode, buf, buflen); + + state = MsiQueryFeatureStateW( product, feature ); + TRACE("feature state: %d\n", state); + switch (mode) + { + case INSTALLMODE_NODETECTION: + break; + + default: + FIXME("mode %x not implemented\n", mode); + return ERROR_INSTALL_FAILURE; + } + + state = MsiGetComponentPathW( product, component, buf, buflen ); + TRACE("component state: %d\n", state); + switch (state) + { + case INSTALLSTATE_INVALIDARG: + return ERROR_INVALID_PARAMETER; + + case INSTALLSTATE_MOREDATA: + return ERROR_MORE_DATA; + + case INSTALLSTATE_ADVERTISED: + case INSTALLSTATE_LOCAL: + case INSTALLSTATE_SOURCE: + MsiUseFeatureW( product, feature ); + return ERROR_SUCCESS; + + default: + TRACE("MsiGetComponentPathW returned %d\n", state); + return ERROR_INSTALL_FAILURE; + } +} + /*********************************************************************** * MsiBeginTransactionA [MSI.@] */ diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index 2d065b1..4438721 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -97,10 +97,10 @@ 101 stub MsiProcessAdvertiseScriptA 102 stub MsiProcessAdvertiseScriptW 103 stdcall MsiProcessMessage(long long long) -104 stub MsiProvideComponentA +104 stdcall MsiProvideComponentA(str str str long ptr ptr) 105 stdcall MsiProvideComponentFromDescriptorA(str ptr ptr ptr) 106 stdcall MsiProvideComponentFromDescriptorW(wstr ptr ptr ptr) -107 stub MsiProvideComponentW +107 stdcall MsiProvideComponentW(wstr wstr wstr long ptr ptr) 108 stdcall MsiProvideQualifiedComponentA(str str long ptr ptr) 109 stdcall MsiProvideQualifiedComponentW(wstr wstr long ptr ptr) 110 stdcall MsiQueryFeatureStateA(str str) diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index c517fcf..3ae3901 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -50,6 +50,10 @@ static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); static INSTALLSTATE (WINAPI *pMsiGetComponentPathA) (LPCSTR, LPCSTR, LPSTR, DWORD*); +static INSTALLSTATE (WINAPI *pMsiProvideComponentA) + (LPCSTR, LPCSTR, LPCSTR, DWORD, LPSTR, LPDWORD); +static INSTALLSTATE (WINAPI *pMsiProvideComponentW) + (LPCWSTR, LPCWSTR, LPCWSTR, DWORD, LPWSTR, LPDWORD); static UINT (WINAPI *pMsiGetFileHashA) (LPCSTR, DWORD, PMSIFILEHASHINFO); static UINT (WINAPI *pMsiGetProductInfoExA) @@ -88,6 +92,8 @@ static void init_functionpointers(void) trace("GetProcAddress(%s) failed\n", #func); GET_PROC(hmsi, MsiGetComponentPathA) + GET_PROC(hmsi, MsiProvideComponentA) + GET_PROC(hmsi, MsiProvideComponentW) GET_PROC(hmsi, MsiGetFileHashA) GET_PROC(hmsi, MsiGetProductInfoExA) GET_PROC(hmsi, MsiOpenPackageExA) @@ -3404,6 +3410,100 @@ static void test_MsiGetComponentPath(void) LocalFree(usersid); } +static void test_MsiProvideComponent(void) +{ + static const WCHAR sourcedirW[] = + {'s','o','u','r','c','e','d','i','r',0}; + static const WCHAR productW[] = + {'{','3','8','8','4','7','3','3','8','-','1','B','B','C','-','4','1','0','4','-', + '8','1','A','C','-','2','F','A','A','C','7','E','C','D','D','C','D','}',0}; + static const WCHAR componentW[] = + {'{','D','D','4','2','2','F','9','2','-','3','E','D','8','-','4','9','B','5','-', + 'A','0','B','7','-','F','2','6','6','F','9','8','3','5','7','D','F','}',0}; + INSTALLSTATE state; + char buf[0x100]; + WCHAR bufW[0x100]; + DWORD len, len2; + UINT r; + + if (is_process_limited()) + { + skip("process is limited\n"); + return; + } + + create_test_files(); + create_file("msitest\\sourcedir.txt", "msitest\\sourcedir.txt", 1000); + create_database(msifile, sd_tables, sizeof(sd_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + buf[0] = 0; + len = sizeof(buf); + r = pMsiProvideComponentA("{90120000-0070-0000-0000-4000000FF1CE}", + "{17961602-C4E2-482E-800A-DF6E627549CF}", + "ProductFiles", INSTALLMODE_NODETECTION, buf, &len); + ok(r == ERROR_INVALID_PARAMETER, "got %u\n", r); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + state = MsiQueryFeatureStateA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", "sourcedir"); + ok(state == INSTALLSTATE_LOCAL, "got %d\n", state); + + buf[0] = 0; + len = sizeof(buf); + r = pMsiProvideComponentA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", "sourcedir", + "{DD422F92-3ED8-49B5-A0B7-F266F98357DF}", + INSTALLMODE_NODETECTION, buf, &len); + ok(r == ERROR_SUCCESS, "got %u\n", r); + ok(buf[0], "empty path\n"); + ok(len == lstrlenA(buf), "got %u\n", len); + + len2 = 0; + r = pMsiProvideComponentA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", "sourcedir", + "{DD422F92-3ED8-49B5-A0B7-F266F98357DF}", + INSTALLMODE_NODETECTION, NULL, &len2); + ok(r == ERROR_SUCCESS, "got %u\n", r); + ok(len2 == len, "got %u\n", len2); + + len2 = 0; + r = pMsiProvideComponentA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", "sourcedir", + "{DD422F92-3ED8-49B5-A0B7-F266F98357DF}", + INSTALLMODE_NODETECTION, buf, &len2); + ok(r == ERROR_MORE_DATA, "got %u\n", r); + ok(len2 == len, "got %u\n", len2); + + /* wide version */ + + bufW[0] = 0; + len = sizeof(buf); + r = pMsiProvideComponentW(productW, sourcedirW, componentW, + INSTALLMODE_NODETECTION, bufW, &len); + ok(r == ERROR_SUCCESS, "got %u\n", r); + ok(bufW[0], "empty path\n"); + ok(len == lstrlenW(bufW), "got %u\n", len); + + len2 = 0; + r = pMsiProvideComponentW(productW, sourcedirW, componentW, + INSTALLMODE_NODETECTION, NULL, &len2); + ok(r == ERROR_SUCCESS, "got %u\n", r); + ok(len2 == len, "got %u\n", len2); + + len2 = 0; + r = pMsiProvideComponentW(productW, sourcedirW, componentW, + INSTALLMODE_NODETECTION, bufW, &len2); + ok(r == ERROR_MORE_DATA, "got %u\n", r); + ok(len2 == len, "got %u\n", len2); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "got %u\n", r); + + DeleteFileA("msitest\\sourcedir.txt"); + delete_test_files(); + DeleteFileA(msifile); +} + static void test_MsiGetProductCode(void) { HKEY compkey, prodkey; @@ -14300,6 +14400,7 @@ START_TEST(msi) test_MsiQueryFeatureState(); test_MsiQueryComponentState(); test_MsiGetComponentPath(); + test_MsiProvideComponent(); test_MsiGetProductCode(); test_MsiEnumClients(); test_MsiGetProductInfo(); diff --git a/include/msi.h b/include/msi.h index 8d0dff2..033ed90 100644 --- a/include/msi.h +++ b/include/msi.h @@ -583,6 +583,10 @@ USERINFOSTATE WINAPI MsiGetUserInfoA(LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, LPS USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, LPWSTR, LPDWORD); #define MsiGetUserInfo WINELIB_NAME_AW(MsiGetUserInfo) +UINT WINAPI MsiProvidedComponentA(LPCSTR, LPCSTR, LPCSTR, DWORD, LPSTR, LPDWORD); +UINT WINAPI MsiProvideComponentW(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, LPWSTR, LPDWORD); +#define MsiProvideComponent WINELIB_NAME_AW(MsiProvideComponent) + UINT WINAPI MsiCollectUserInfoA(LPCSTR); UINT WINAPI MsiCollectUserInfoW(LPCWSTR); #define MsiCollectUserInfo WINELIB_NAME_AW(MsiCollectUserInfo)
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_BaseBoard.Product.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: b24b8a507f04d15a7a13a87740e46233e774ccb3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b24b8a507f04d15a7a13a8774…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:26:11 2015 +0100 wbemprox: Implement Win32_BaseBoard.Product. --- dlls/wbemprox/builtin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index ecbdec5..80a1657 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -240,6 +240,8 @@ static const WCHAR prop_processidW[] = {'P','r','o','c','e','s','s','I','D',0}; static const WCHAR prop_processoridW[] = {'P','r','o','c','e','s','s','o','r','I','d',0}; +static const WCHAR prop_productW[] = + {'P','r','o','d','u','c','t',0}; static const WCHAR prop_productnameW[] = {'P','r','o','d','u','c','t','N','a','m','e',0}; static const WCHAR prop_releasedateW[] = @@ -305,6 +307,7 @@ static const struct column col_baseboard[] = { prop_manufacturerW, CIM_STRING }, { prop_modelW, CIM_STRING }, { prop_nameW, CIM_STRING }, + { prop_productW, CIM_STRING }, { prop_serialnumberW, CIM_STRING }, { prop_tagW, CIM_STRING|COL_FLAG_KEY } }; @@ -632,6 +635,7 @@ struct record_baseboard const WCHAR *manufacturer; const WCHAR *model; const WCHAR *name; + const WCHAR *product; const WCHAR *serialnumber; const WCHAR *tag; }; @@ -869,7 +873,7 @@ struct record_videocontroller static const struct record_baseboard data_baseboard[] = { - { baseboard_manufacturerW, baseboard_tagW, baseboard_tagW, baseboard_serialnumberW, baseboard_tagW } + { baseboard_manufacturerW, baseboard_tagW, baseboard_tagW, baseboard_tagW, baseboard_serialnumberW, baseboard_tagW } }; static const struct record_bios data_bios[] = {
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_ComputerSystemProduct.IdentifyingNumber.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: f40830b45d2f8653e39cc2fe1acede72d92955bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f40830b45d2f8653e39cc2fe1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:25:50 2015 +0100 wbemprox: Implement Win32_ComputerSystemProduct.IdentifyingNumber. --- dlls/wbemprox/builtin.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 5f61f4a..ecbdec5 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -176,6 +176,8 @@ static const WCHAR prop_idW[] = {'I','D',0}; static const WCHAR prop_identificationcodeW[] = {'I','d','e','n','t','i','f','i','c','a','t','i','o','n','C','o','d','e',0}; +static const WCHAR prop_identifyingnumberW[] = + {'I','d','e','n','t','i','f','y','i','n','g','N','u','m','b','e','r',0}; static const WCHAR prop_indexW[] = {'I','n','d','e','x',0}; static const WCHAR prop_installdateW[] = @@ -338,7 +340,8 @@ static const struct column col_compsys[] = }; static const struct column col_compsysproduct[] = { - { prop_uuidW, CIM_STRING } + { prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY }, + { prop_uuidW, CIM_STRING } }; static const struct column col_datafile[] = { @@ -571,6 +574,8 @@ static const WCHAR compsys_manufacturerW[] = {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0}; static const WCHAR compsys_modelW[] = {'W','i','n','e',0}; +static const WCHAR compsysproduct_identifyingnumberW[] = + {'0',0}; static const WCHAR compsysproduct_uuidW[] = {'0','0','0','0','0','0','0','0','-','0','0','0','0','-','0','0','0','0','-','0','0','0','0','-', '0','0','0','0','0','0','0','0','0','0','0','0',0}; @@ -662,6 +667,7 @@ struct record_computersystem }; struct record_computersystemproduct { + const WCHAR *identifyingnumber; const WCHAR *uuid; }; struct record_datafile @@ -872,7 +878,7 @@ static const struct record_bios data_bios[] = }; static const struct record_computersystemproduct data_compsysproduct[] = { - { compsysproduct_uuidW } + { compsysproduct_identifyingnumberW, compsysproduct_uuidW } }; static const struct record_param data_param[] = {
1
0
0
0
Hans Leidekker : winhttp: Don't try to read data after a HEAD request.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: 27ba8c834326bb526fc57148feb6d83883c7a7c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27ba8c834326bb526fc57148f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:25:18 2015 +0100 winhttp: Don't try to read data after a HEAD request. --- dlls/winhttp/request.c | 34 +++++++++++++-------- dlls/winhttp/tests/winhttp.c | 70 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 13 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index de5eae4..dc13fd0 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1807,20 +1807,23 @@ static DWORD set_content_length( request_t *request, DWORD status ) WCHAR encoding[20]; DWORD buflen = sizeof(request->content_length); - if (status == HTTP_STATUS_NO_CONTENT || status == HTTP_STATUS_NOT_MODIFIED) + if (status == HTTP_STATUS_NO_CONTENT || status == HTTP_STATUS_NOT_MODIFIED || !strcmpW( request->verb, headW )) request->content_length = 0; - else if (!query_headers( request, WINHTTP_QUERY_CONTENT_LENGTH|WINHTTP_QUERY_FLAG_NUMBER, - NULL, &request->content_length, &buflen, NULL )) - request->content_length = ~0u; - - buflen = sizeof(encoding); - if (query_headers( request, WINHTTP_QUERY_TRANSFER_ENCODING, NULL, encoding, &buflen, NULL ) && - !strcmpiW( encoding, chunkedW )) + else { - request->content_length = ~0u; - request->read_chunked = TRUE; - request->read_chunked_size = ~0u; - request->read_chunked_eof = FALSE; + if (!query_headers( request, WINHTTP_QUERY_CONTENT_LENGTH|WINHTTP_QUERY_FLAG_NUMBER, + NULL, &request->content_length, &buflen, NULL )) + request->content_length = ~0u; + + buflen = sizeof(encoding); + if (query_headers( request, WINHTTP_QUERY_TRANSFER_ENCODING, NULL, encoding, &buflen, NULL ) && + !strcmpiW( encoding, chunkedW )) + { + request->content_length = ~0u; + request->read_chunked = TRUE; + request->read_chunked_size = ~0u; + request->read_chunked_eof = FALSE; + } } request->content_read = 0; return request->content_length; @@ -1969,6 +1972,7 @@ static DWORD get_available_data( request_t *request ) /* check if we have reached the end of the data to read */ static BOOL end_of_read_data( request_t *request ) { + if (!request->content_length) return TRUE; if (request->read_chunked) return request->read_chunked_eof; if (request->content_length == ~0u) return FALSE; return (request->content_length == request->content_read); @@ -2394,8 +2398,11 @@ BOOL WINAPI WinHttpReceiveResponse( HINTERNET hrequest, LPVOID reserved ) static BOOL query_data_available( request_t *request, DWORD *available, BOOL async ) { - DWORD count = get_available_data( request ); + DWORD count = 0; + + if (end_of_read_data( request )) goto done; + count = get_available_data( request ); if (!request->read_chunked) count += netconn_query_data_available( &request->netconn ); if (!count) @@ -2406,6 +2413,7 @@ static BOOL query_data_available( request_t *request, DWORD *available, BOOL asy count += netconn_query_data_available( &request->netconn ); } +done: if (async) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, &count, sizeof(count) ); TRACE("%u bytes available\n", count); if (available) *available = count; diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 384df23..2cad807 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -1818,6 +1818,11 @@ static const char okauthmsg[] = "Connection: close\r\n" "\r\n"; +static const char headmsg[] = +"HTTP/1.1 200 OK\r\n" +"Content-Length: 100\r\n" +"\r\n"; + struct server_info { HANDLE event; @@ -1904,6 +1909,11 @@ static DWORD CALLBACK server_thread(LPVOID param) send(c, notmodified, sizeof notmodified - 1, 0); continue; } + if (strstr(buffer, "HEAD /head")) + { + send(c, headmsg, sizeof headmsg - 1, 0); + continue; + } if (strstr(buffer, "GET /quit")) { send(c, okmsg, sizeof okmsg - 1, 0); @@ -2220,6 +2230,65 @@ static void test_no_content(int port) WinHttpCloseHandle(ses); } +static void test_head_request(int port) +{ + static const WCHAR verbW[] = {'H','E','A','D',0}; + static const WCHAR headW[] = {'/','h','e','a','d',0}; + HINTERNET ses, con, req; + char buf[128]; + DWORD size, len, count, status; + BOOL ret; + + ses = WinHttpOpen(test_useragent, 0, 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, verbW, headW, 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 get status code %u\n", GetLastError()); + ok(status == 200, "got %u\n", status); + + len = 0xdeadbeef; + size = sizeof(len); + ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER, + NULL, &len, &size, 0); + ok(ret, "failed to get content-length header %u\n", GetLastError()); + ok(len == 100, "got %u\n", len); + + count = 0xdeadbeef; + ret = WinHttpQueryDataAvailable(req, &count); + ok(ret, "failed to query data available %u\n", GetLastError()); + ok(!count, "got %u\n", count); + + len = sizeof(buf); + count = 0xdeadbeef; + ret = WinHttpReadData(req, buf, len, &count); + ok(ret, "failed to read data %u\n", GetLastError()); + ok(!count, "got %u\n", count); + + count = 0xdeadbeef; + ret = WinHttpQueryDataAvailable(req, &count); + ok(ret, "failed to query data available %u\n", GetLastError()); + ok(!count, "got %u\n", count); + + WinHttpCloseHandle(req); + WinHttpCloseHandle(con); + WinHttpCloseHandle(ses); +} + static void test_not_modified(int port) { static const WCHAR pathW[] = {'/','n','o','t','_','m','o','d','i','f','i','e','d',0}; @@ -3278,6 +3347,7 @@ START_TEST (winhttp) test_basic_request(si.port, NULL, basicW); test_no_headers(si.port); test_no_content(si.port); + test_head_request(si.port); test_not_modified(si.port); test_basic_authentication(si.port); test_bad_header(si.port);
1
0
0
0
Hans Leidekker : winhttp/tests: Keep the connection alive in a couple of tests.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: 142ac824908635a5458eda311aeb6fbee9ad316a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=142ac824908635a5458eda311…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:24:52 2015 +0100 winhttp/tests: Keep the connection alive in a couple of tests. --- dlls/winhttp/tests/winhttp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 2eff8b3..384df23 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -31,7 +31,6 @@ #include "wine/test.h" -static HANDLE wait_event; static const WCHAR test_useragent[] = {'W','i','n','e',' ','R','e','g','r','e','s','s','i','o','n',' ','T','e','s','t',0}; static const WCHAR test_winehq[] = {'t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',0}; @@ -1830,7 +1829,7 @@ struct server_info static DWORD CALLBACK server_thread(LPVOID param) { struct server_info *si = param; - int r, c, i, on; + int r, c = -1, i, on; SOCKET s; struct sockaddr_in sa; char buffer[0x100]; @@ -1859,7 +1858,7 @@ static DWORD CALLBACK server_thread(LPVOID param) SetEvent(si->event); do { - c = accept(s, NULL, NULL); + if (c == -1) c = accept(s, NULL, NULL); memset(buffer, 0, sizeof buffer); for(i = 0; i < sizeof buffer - 1; i++) @@ -1898,11 +1897,12 @@ static DWORD CALLBACK server_thread(LPVOID param) if (strstr(buffer, "GET /no_content")) { send(c, nocontentmsg, sizeof nocontentmsg - 1, 0); + continue; } if (strstr(buffer, "GET /not_modified")) { send(c, notmodified, sizeof notmodified - 1, 0); - WaitForSingleObject(wait_event, 5000); + continue; } if (strstr(buffer, "GET /quit")) { @@ -1912,6 +1912,7 @@ static DWORD CALLBACK server_thread(LPVOID param) } shutdown(c, 2); closesocket(c); + c = -1; } while (!last_request); @@ -2250,8 +2251,6 @@ static void test_not_modified(int port) ret = WinHttpReceiveResponse(request, NULL); ok(ret, "WinHttpReceiveResponse failed: %u\n", GetLastError()); - SetEvent(wait_event); - size = sizeof(status); ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); @@ -3275,8 +3274,6 @@ START_TEST (winhttp) if (ret != WAIT_OBJECT_0) return; - wait_event = CreateEventW(NULL, FALSE, FALSE, NULL); - test_connection_info(si.port); test_basic_request(si.port, NULL, basicW); test_no_headers(si.port); @@ -3289,7 +3286,5 @@ START_TEST (winhttp) /* send the basic request again to shutdown the server thread */ test_basic_request(si.port, NULL, quitW); - CloseHandle(wait_event); - WaitForSingleObject(thread, 3000); }
1
0
0
0
Hans Leidekker : ntdll: Fix calculation of process and thread affinity masks on systems with a large number of processors.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: faf70e2fbddc5299afd21d8298a81f257127c230 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=faf70e2fbddc5299afd21d829…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:24:14 2015 +0100 ntdll: Fix calculation of process and thread affinity masks on systems with a large number of processors. --- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/process.c | 17 ++++++++++++++--- dlls/ntdll/thread.c | 6 +++--- dlls/ntdll/virtual.c | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index b7ea6dc..92e5baf 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -46,6 +46,7 @@ struct drive_info }; extern NTSTATUS close_handle( HANDLE ) DECLSPEC_HIDDEN; +extern ULONG_PTR get_system_affinity_mask(void) DECLSPEC_HIDDEN; /* exceptions */ extern void wait_suspend( CONTEXT *context ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index 3defb6e..3ac8d52 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -98,6 +98,13 @@ static UINT process_error_mode; ret = STATUS_INVALID_INFO_CLASS; \ break +ULONG_PTR get_system_affinity_mask(void) +{ + ULONG num_cpus = NtCurrentTeb()->Peb->NumberOfProcessors; + if (num_cpus >= sizeof(ULONG_PTR) * 8) return ~(ULONG_PTR)0; + return ((ULONG_PTR)1 << num_cpus) - 1; +} + /****************************************************************************** * NtQueryInformationProcess [NTDLL.@] * ZwQueryInformationProcess [NTDLL.@] @@ -145,7 +152,7 @@ NTSTATUS WINAPI NtQueryInformationProcess( case ProcessBasicInformation: { PROCESS_BASIC_INFORMATION pbi; - const ULONG_PTR affinity_mask = ((ULONG_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; + const ULONG_PTR affinity_mask = get_system_affinity_mask(); if (ProcessInformationLength >= sizeof(PROCESS_BASIC_INFORMATION)) { @@ -389,7 +396,7 @@ NTSTATUS WINAPI NtQueryInformationProcess( len = sizeof(ULONG_PTR); if (ProcessInformationLength == len) { - const ULONG_PTR system_mask = ((ULONG_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; + const ULONG_PTR system_mask = get_system_affinity_mask(); SERVER_START_REQ(get_process_info) { @@ -487,8 +494,11 @@ NTSTATUS WINAPI NtSetInformationProcess( process_error_mode = *(UINT *)ProcessInformation; break; case ProcessAffinityMask: + { + const ULONG_PTR system_mask = get_system_affinity_mask(); + if (ProcessInformationLength != sizeof(DWORD_PTR)) return STATUS_INVALID_PARAMETER; - if (*(PDWORD_PTR)ProcessInformation & ~(((DWORD_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1)) + if (*(PDWORD_PTR)ProcessInformation & ~system_mask) return STATUS_INVALID_PARAMETER; if (!*(PDWORD_PTR)ProcessInformation) return STATUS_INVALID_PARAMETER; @@ -501,6 +511,7 @@ NTSTATUS WINAPI NtSetInformationProcess( } SERVER_END_REQ; break; + } case ProcessPriorityClass: if (ProcessInformationLength != sizeof(PROCESS_PRIORITY_CLASS)) return STATUS_INVALID_PARAMETER; diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index c8461b0..7dd13f2 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -900,7 +900,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, case ThreadBasicInformation: { THREAD_BASIC_INFORMATION info; - const ULONG_PTR affinity_mask = ((ULONG_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; + const ULONG_PTR affinity_mask = get_system_affinity_mask(); SERVER_START_REQ( get_thread_info ) { @@ -927,7 +927,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, return status; case ThreadAffinityMask: { - const ULONG_PTR affinity_mask = ((ULONG_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; + const ULONG_PTR affinity_mask = get_system_affinity_mask(); ULONG_PTR affinity = 0; SERVER_START_REQ( get_thread_info ) @@ -1170,7 +1170,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, return status; case ThreadAffinityMask: { - const ULONG_PTR affinity_mask = ((ULONG_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; + const ULONG_PTR affinity_mask = get_system_affinity_mask(); ULONG_PTR req_aff; if (length != sizeof(ULONG_PTR)) return STATUS_INVALID_PARAMETER; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 4c4c05d..9f82204 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1409,7 +1409,7 @@ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) info->AllocationGranularity = get_mask(0) + 1; info->LowestUserAddress = (void *)0x10000; info->HighestUserAddress = (char *)user_space_limit - 1; - info->ActiveProcessorsAffinityMask = (1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; + info->ActiveProcessorsAffinityMask = get_system_affinity_mask(); info->NumberOfProcessors = NtCurrentTeb()->Peb->NumberOfProcessors; }
1
0
0
0
Hans Leidekker : kernel32: Retrieve the system affinity mask from ntdll.
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: b51476ad42827e830bf38e561847bda6fe11a4c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b51476ad42827e830bf38e561…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jan 21 13:23:36 2015 +0100 kernel32: Retrieve the system affinity mask from ntdll. --- dlls/kernel32/process.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 396b7d4..8204dd9 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3259,13 +3259,21 @@ BOOL WINAPI GetProcessAffinityMask( HANDLE hProcess, PDWORD_PTR process_mask, PD { NTSTATUS status = STATUS_SUCCESS; - if (system_mask) *system_mask = (1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; if (process_mask) { if ((status = NtQueryInformationProcess( hProcess, ProcessAffinityMask, process_mask, sizeof(*process_mask), NULL ))) SetLastError( RtlNtStatusToDosError(status) ); } + if (system_mask && status == STATUS_SUCCESS) + { + SYSTEM_BASIC_INFORMATION info; + + if ((status = NtQuerySystemInformation( SystemBasicInformation, &info, sizeof(info), NULL ))) + SetLastError( RtlNtStatusToDosError(status) ); + else + *system_mask = info.ActiveProcessorsAffinityMask; + } return !status; }
1
0
0
0
Nikolay Sivov : dwrite/tests: Basic test for GetTypographicFeatures().
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: 0258e5319bd13f83e56000985fdb08d3c5511cfd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0258e5319bd13f83e56000985…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jan 21 15:09:32 2015 +0300 dwrite/tests: Basic test for GetTypographicFeatures(). --- dlls/dwrite/tests/analyzer.c | 118 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index 233f072..acb5b18 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -265,6 +265,14 @@ static HRESULT WINAPI analysissink_SetScriptAnalysis(IDWriteTextAnalysisSink *if return S_OK; } +static DWRITE_SCRIPT_ANALYSIS g_sa; +static HRESULT WINAPI analysissink_SetScriptAnalysis2(IDWriteTextAnalysisSink *iface, + UINT32 position, UINT32 length, DWRITE_SCRIPT_ANALYSIS const* sa) +{ + g_sa = *sa; + return S_OK; +} + #define BREAKPOINT_COUNT 20 static DWRITE_LINE_BREAKPOINT g_actual_bp[BREAKPOINT_COUNT]; @@ -310,7 +318,18 @@ static IDWriteTextAnalysisSinkVtbl analysissinkvtbl = { analysissink_SetNumberSubstitution }; +static IDWriteTextAnalysisSinkVtbl analysissinkvtbl2 = { + analysissink_QueryInterface, + analysissink_AddRef, + analysissink_Release, + analysissink_SetScriptAnalysis2, + analysissink_SetLineBreakpoints, + analysissink_SetBidiLevel, + analysissink_SetNumberSubstitution +}; + static IDWriteTextAnalysisSink analysissink = { &analysissinkvtbl }; +static IDWriteTextAnalysisSink analysissink2 = { &analysissinkvtbl2 }; static HRESULT WINAPI analysissource_QueryInterface(IDWriteTextAnalysisSource *iface, REFIID riid, void **obj) @@ -836,6 +855,22 @@ static void init_expected_sa(struct call_sequence **seq, const struct sa_test *t add_call(seq, 0, &end_of_sequence); } +static void get_script_analysis(const WCHAR *str, DWRITE_SCRIPT_ANALYSIS *sa) +{ + IDWriteTextAnalyzer *analyzer; + HRESULT hr; + + g_source = str; + + hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteTextAnalyzer_AnalyzeScript(analyzer, &analysissource, 0, lstrlenW(g_source), &analysissink2); + ok(hr == S_OK, "got 0x%08x\n", hr); + + *sa = g_sa; +} + static void test_AnalyzeScript(void) { const struct sa_test *ptr = sa_tests; @@ -1174,6 +1209,88 @@ if (0) { IDWriteFontFace_Release(fontface); } +static BOOL has_feature(const DWRITE_FONT_FEATURE_TAG *tags, UINT32 count, DWRITE_FONT_FEATURE_TAG feature) +{ + UINT32 i; + + for (i = 0; i < count; i++) + if (tags[i] == feature) return TRUE; + return FALSE; +} + +static void test_GetTypographicFeatures(void) +{ + static const WCHAR localeW[] = {'c','a','d','a','b','r','a',0}; + static const WCHAR arabicW[] = {0x064a,0x064f,0x0633,0}; + static const WCHAR abcW[] = {'a','b','c',0}; + DWRITE_FONT_FEATURE_TAG tags[20]; + IDWriteTextAnalyzer2 *analyzer2; + IDWriteTextAnalyzer *analyzer; + IDWriteFontFace *fontface; + DWRITE_SCRIPT_ANALYSIS sa; + UINT32 count; + HRESULT hr; + BOOL ret; + + hr = IDWriteFactory_CreateTextAnalyzer(factory, &analyzer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteTextAnalyzer_QueryInterface(analyzer, &IID_IDWriteTextAnalyzer2, (void**)&analyzer2); + IDWriteTextAnalyzer_Release(analyzer); + if (hr != S_OK) { + win_skip("GetTypographicFeatures() is not supported.\n"); + return; + } + + fontface = create_fontface(); + + get_script_analysis(abcW, &sa); + count = 0; + hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, NULL, 0, &count, NULL); +todo_wine { + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(count > 0, "got %u\n", count); +} + /* invalid locale name is ignored */ + get_script_analysis(abcW, &sa); + count = 0; + hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, localeW, 0, &count, NULL); +todo_wine { + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); + ok(count > 0, "got %u\n", count); +} + /* both GSUB and GPOS features are reported */ + get_script_analysis(arabicW, &sa); + memset(tags, 0, sizeof(tags)); + count = 0; + hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, NULL, sizeof(tags)/sizeof(tags[0]), &count, tags); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(count > 0, "got %u\n", count); + ret = has_feature(tags, count, DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES); + ok(ret, "expected 'calt' feature\n"); + ret = has_feature(tags, count, DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING); + ok(ret, "expected 'mkmk' feature\n"); +} + get_script_analysis(abcW, &sa); + memset(tags, 0, sizeof(tags)); + count = 0; + hr = IDWriteTextAnalyzer2_GetTypographicFeatures(analyzer2, fontface, sa, NULL, sizeof(tags)/sizeof(tags[0]), &count, tags); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(count > 0, "got %u\n", count); + ret = has_feature(tags, count, DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION); + ok(ret, "expected 'ccmp' feature\n"); + ret = has_feature(tags, count, DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING); + ok(ret, "expected 'mkmk' feature\n"); +} + ret = has_feature(tags, count, DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES); + ok(!ret, "unexpected 'calt' feature\n"); + + IDWriteFontFace_Release(fontface); + IDWriteTextAnalyzer2_Release(analyzer2); +} + START_TEST(analyzer) { HRESULT hr; @@ -1195,6 +1312,7 @@ START_TEST(analyzer) test_GetTextComplexity(); test_GetGlyphs(); test_numbersubstitution(); + test_GetTypographicFeatures(); IDWriteFactory_Release(factory); }
1
0
0
0
Michael Stefaniuc : schedsvc/tests: Actually test a return value ( PVS-Studio).
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: 4d01e6f3fcecdc69fe72c01244b482896ffa81f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4d01e6f3fcecdc69fe72c0124…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 21 12:04:52 2015 +0100 schedsvc/tests: Actually test a return value (PVS-Studio). --- dlls/schedsvc/tests/rpcapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/schedsvc/tests/rpcapi.c b/dlls/schedsvc/tests/rpcapi.c index b3007f7..cb83ac5 100644 --- a/dlls/schedsvc/tests/rpcapi.c +++ b/dlls/schedsvc/tests/rpcapi.c @@ -113,6 +113,7 @@ START_TEST(rpcapi) version = 0; hr = SchRpcHighestVersion(&version); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); ok(version == 0x10002 /* vista */ || version == 0x10003 /* win7 */ || version == 0x10004 /* win8 */, "wrong version %#x\n", version);
1
0
0
0
Michael Stefaniuc : scrrun/tests: Actually test the return values ( PVS-Studio).
by Alexandre Julliard
21 Jan '15
21 Jan '15
Module: wine Branch: master Commit: f0d7765236af265aa1fc8fa20c8e012b7472fee7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0d7765236af265aa1fc8fa20…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jan 21 12:02:19 2015 +0100 scrrun/tests: Actually test the return values (PVS-Studio). --- dlls/scrrun/tests/filesystem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index 54cf4e3..b3f3bee 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -1578,6 +1578,7 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); str = SysAllocString(aW); hr = ITextStream_Write(stream, str); + ok(hr == S_OK, "got 0x%08x\n", hr); SysFreeString(str); ITextStream_Release(stream); @@ -1730,6 +1731,7 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); str = SysAllocString(aW); hr = ITextStream_Write(stream, str); + ok(hr == S_OK, "got 0x%08x\n", hr); SysFreeString(str); ITextStream_Release(stream);
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
31
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
Results per page:
10
25
50
100
200