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
August 2019
----- 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
703 discussions
Start a n
N
ew thread
Piotr Caban : msvcp90: Add support for more creation flags in _Mtx class.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 9e5541cbfb0c12f16a531ae2f45a111e579227ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9e5541cbfb0c12f16a531ae2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Mar 26 18:12:13 2019 +0100 msvcp90: Add support for more creation flags in _Mtx class. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46908
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8a82912b28aa0c0c3ac4fc309fa8079e4415111d) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcp120/tests/msvcp120.c | 44 ++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/misc.c | 13 +++++++++---- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index ac38aa6..7bf0237 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -323,6 +323,10 @@ typedef struct void *tail; } critical_section; +#define MTX_PLAIN 0x1 +#define MTX_TRY 0x2 +#define MTX_TIMED 0x4 +#define MTX_RECURSIVE 0x100 typedef struct { DWORD flags; @@ -335,6 +339,7 @@ static int (__cdecl *p__Mtx_init)(_Mtx_t*, int); static void (__cdecl *p__Mtx_destroy)(_Mtx_t*); static int (__cdecl *p__Mtx_lock)(_Mtx_t*); static int (__cdecl *p__Mtx_unlock)(_Mtx_t*); +static int (__cdecl *p__Mtx_trylock)(_Mtx_t*); /* cnd */ typedef void *_Cnd_t; @@ -801,6 +806,8 @@ static BOOL init(void) "_Mtx_lock"); SET(p__Mtx_unlock, "_Mtx_unlock"); + SET(p__Mtx_trylock, + "_Mtx_trylock"); SET(p__Cnd_init, "_Cnd_init"); @@ -2440,6 +2447,42 @@ static void test__Pad(void) CloseHandle(_Pad__Launch_returned); } +static void test__Mtx(void) +{ +# + static int flags[] = + { + 0, MTX_PLAIN, MTX_TRY, MTX_TIMED, MTX_RECURSIVE, + MTX_PLAIN|MTX_TRY, MTX_PLAIN|MTX_RECURSIVE, MTX_PLAIN|0xbeef + }; + _Mtx_t mtx; + int i, r, expect; + + for (i=0; i<ARRAY_SIZE(flags); i++) + { + if (flags[i] == MTX_PLAIN || flags[i] & MTX_RECURSIVE) + expect = 0; + else + expect = 3; + + r = p__Mtx_init(&mtx, flags[i]); + ok(!r, "failed to init mtx (flags %x)\n", flags[i]); + + r = p__Mtx_trylock(&mtx); + ok(!r, "_Mtx_trylock returned %x (flags %x)\n", r, flags[i]); + r = p__Mtx_trylock(&mtx); + ok(r == expect, "_Mtx_trylock returned %x (flags %x)\n", r, flags[i]); + if(!r) p__Mtx_unlock(&mtx); + + r = p__Mtx_lock(&mtx); + ok(r == expect, "_Mtx_lock returned %x (flags %x)\n", r, flags[i]); + if(!r) p__Mtx_unlock(&mtx); + + p__Mtx_unlock(&mtx); + p__Mtx_destroy(&mtx); + } +} + static void test_threads__Mtx(void) { void *mtx = NULL; @@ -3343,6 +3386,7 @@ START_TEST(msvcp120) test_thrd(); test_cnd(); test__Pad(); + test__Mtx(); test_threads__Mtx(); test_vector_base_v4__Segment_index_of(); diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 0e81b8d..dac6a96 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -681,7 +681,10 @@ __ASM_GLOBAL_FUNC(call_thiscall_func, #endif /* __i386__ */ -#define MTX_MULTI_LOCK 0x100 +#define MTX_PLAIN 0x1 +#define MTX_TRY 0x2 +#define MTX_TIMED 0x4 +#define MTX_RECURSIVE 0x100 #define MTX_LOCKED 3 typedef struct { @@ -703,7 +706,7 @@ typedef _Mtx_t *_Mtx_arg_t; void __cdecl _Mtx_init_in_situ(_Mtx_t mtx, int flags) { - if(flags & ~MTX_MULTI_LOCK) + if(flags & ~(MTX_PLAIN | MTX_TRY | MTX_TIMED | MTX_RECURSIVE)) FIXME("unknown flags ignored: %x\n", flags); mtx->flags = flags; @@ -740,7 +743,8 @@ int __cdecl _Mtx_lock(_Mtx_arg_t mtx) if(MTX_T_FROM_ARG(mtx)->thread_id != GetCurrentThreadId()) { call_func1(critical_section_lock, &MTX_T_FROM_ARG(mtx)->cs); MTX_T_FROM_ARG(mtx)->thread_id = GetCurrentThreadId(); - }else if(!(MTX_T_FROM_ARG(mtx)->flags & MTX_MULTI_LOCK)) { + }else if(!(MTX_T_FROM_ARG(mtx)->flags & MTX_RECURSIVE) + && MTX_T_FROM_ARG(mtx)->flags != MTX_PLAIN) { return MTX_LOCKED; } @@ -764,7 +768,8 @@ int __cdecl _Mtx_trylock(_Mtx_arg_t mtx) if(!call_func1(critical_section_trylock, &MTX_T_FROM_ARG(mtx)->cs)) return MTX_LOCKED; MTX_T_FROM_ARG(mtx)->thread_id = GetCurrentThreadId(); - }else if(!(MTX_T_FROM_ARG(mtx)->flags & MTX_MULTI_LOCK)) { + }else if(!(MTX_T_FROM_ARG(mtx)->flags & MTX_RECURSIVE) + && MTX_T_FROM_ARG(mtx)->flags != MTX_PLAIN) { return MTX_LOCKED; }
1
0
0
0
Gijs Vermeulen : hnetcfg: Initialize INetFwRules:: get__NewEnum out parameter.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: d614927a10835d47eb5bd0f4b1c2dbe4f4b3dbd2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d614927a10835d47eb5bd0f4…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Tue Mar 26 17:04:44 2019 +0100 hnetcfg: Initialize INetFwRules::get__NewEnum out parameter. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46906
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 16803516ef0967b1290bcdac269f4e157af163f1) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/hnetcfg/policy.c | 4 ++++ dlls/hnetcfg/tests/policy.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/dlls/hnetcfg/policy.c b/dlls/hnetcfg/policy.c index c2f3252..c549ead 100644 --- a/dlls/hnetcfg/policy.c +++ b/dlls/hnetcfg/policy.c @@ -238,6 +238,10 @@ static HRESULT WINAPI netfw_rules_get__NewEnum( fw_rules *This = impl_from_INetFwRules( iface ); FIXME("%p, %p\n", This, newEnum); + + if (!newEnum) return E_POINTER; + *newEnum = NULL; + return E_NOTIMPL; } diff --git a/dlls/hnetcfg/tests/policy.c b/dlls/hnetcfg/tests/policy.c index 3fa8348..8701455 100644 --- a/dlls/hnetcfg/tests/policy.c +++ b/dlls/hnetcfg/tests/policy.c @@ -60,6 +60,9 @@ static void test_policy2_rules(INetFwPolicy2 *policy2) INetFwServiceRestriction_Release(restriction); } + hr = INetFwRules_get__NewEnum(rules, NULL); + ok(hr == E_POINTER, "got %08x\n", hr); + INetFwRules_Release(rules); INetFwRules_Release(rules2); }
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_OperatingSystem.OperatingSystemSKU.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: fee0e11d3641ac3dac2639838257985db5086cc2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fee0e11d3641ac3dac263983…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Mar 25 10:06:05 2019 +0100 wbemprox: Implement Win32_OperatingSystem.OperatingSystemSKU. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46895
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 5b2113de2d62a22828d793a3fd82741c8f181c70) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wbemprox/builtin.c | 11 +++++++++++ dlls/wbemprox/tests/query.c | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 67b048c..a7dd23b 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -312,6 +312,8 @@ static const WCHAR prop_numlogicalprocessorsW[] = {'N','u','m','b','e','r','O','f','L','o','g','i','c','a','l','P','r','o','c','e','s','s','o','r','s',0}; static const WCHAR prop_numprocessorsW[] = {'N','u','m','b','e','r','O','f','P','r','o','c','e','s','s','o','r','s',0}; +static const WCHAR prop_operatingsystemskuW[] = + {'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m','S','K','U',0}; static const WCHAR prop_osarchitectureW[] = {'O','S','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_oslanguageW[] = @@ -584,6 +586,7 @@ static const struct column col_os[] = { prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_operatingsystemskuW, CIM_UINT32, VT_I4 }, { prop_osarchitectureW, CIM_STRING }, { prop_oslanguageW, CIM_UINT32, VT_I4 }, { prop_osproductsuiteW, CIM_UINT32, VT_I4 }, @@ -1009,6 +1012,7 @@ struct record_operatingsystem const WCHAR *localdatetime; const WCHAR *locale; const WCHAR *name; + UINT32 operatingsystemsku; const WCHAR *osarchitecture; UINT32 oslanguage; UINT32 osproductsuite; @@ -3116,6 +3120,12 @@ static WCHAR *get_osversion( OSVERSIONINFOEXW *ver ) if (ret) sprintfW( ret, fmtW, ver->dwMajorVersion, ver->dwMinorVersion, ver->dwBuildNumber ); return ret; } +static DWORD get_operatingsystemsku(void) +{ + DWORD ret = PRODUCT_UNDEFINED; + GetProductInfo( 6, 0, 0, 0, &ret ); + return ret; +} static enum fill_status fill_os( struct table *table, const struct expr *cond ) { @@ -3141,6 +3151,7 @@ static enum fill_status fill_os( struct table *table, const struct expr *cond ) rec->localdatetime = get_localdatetime(); rec->locale = get_locale(); rec->name = get_osname( rec->caption ); + rec->operatingsystemsku = get_operatingsystemsku(); rec->osarchitecture = get_osarchitecture(); rec->oslanguage = GetSystemDefaultLangID(); rec->osproductsuite = 2461140; /* Windows XP Professional */ diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index d19797c..7819f85 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1183,6 +1183,7 @@ static void test_Win32_OperatingSystem( IWbemServices *services ) static const WCHAR csdversionW[] = {'C','S','D','V','e','r','s','i','o','n',0}; static const WCHAR freephysicalmemoryW[] = {'F','r','e','e','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; static const WCHAR nameW[] = {'N','a','m','e',0}; + static const WCHAR operatingsystemskuW[] = {'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m','S','K','U',0}; static const WCHAR osproductsuiteW[] = {'O','S','P','r','o','d','u','c','t','S','u','i','t','e',0}; static const WCHAR ostypeW[] = {'O','S','T','y','p','e',0}; static const WCHAR suitemaskW[] = {'S','u','i','t','e','M','a','s','k',0}; @@ -1264,6 +1265,18 @@ static void test_Win32_OperatingSystem( IWbemServices *services ) type = 0xdeadbeef; VariantInit( &val ); + hr = IWbemClassObject_Get( obj, operatingsystemskuW, 0, &val, &type, NULL ); + ok( hr == S_OK || broken(hr == WBEM_E_NOT_FOUND) /* winxp */, "failed to get operatingsystemsku %08x\n", hr ); + if (hr == S_OK) + { + ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) ); + ok( type == CIM_UINT32, "unexpected type 0x%x\n", type ); + trace( "operatingsystemsku: %08x\n", V_I4( &val ) ); + VariantClear( &val ); + } + + type = 0xdeadbeef; + VariantInit( &val ); hr = IWbemClassObject_Get( obj, osproductsuiteW, 0, &val, &type, NULL ); ok( hr == S_OK, "failed to get osproductsuite %08x\n", hr ); ok( V_VT( &val ) == VT_I4 || broken(V_VT( &val ) == VT_NULL) /* winxp */, "unexpected variant type 0x%x\n", V_VT( &val ) );
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_PhysicalMemory.DeviceLocator.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 7748bc4e3499c42b24f39453a460ec75f9aefb67 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7748bc4e3499c42b24f39453…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Mar 25 10:06:04 2019 +0100 wbemprox: Implement Win32_PhysicalMemory.DeviceLocator. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46894
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 66b2b3ea6836838e8c49e963ffceddb42836ee5f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wbemprox/builtin.c | 18 ++++++++++++------ dlls/wbemprox/tests/query.c | 10 ++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index c658cc32..67b048c 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -202,6 +202,8 @@ static const WCHAR prop_destinationW[] = {'D','e','s','t','i','n','a','t','i','o','n',0}; static const WCHAR prop_deviceidW[] = {'D','e','v','i','c','e','I','d',0}; +static const WCHAR prop_devicelocatorW[] = + {'D','e','v','i','c','e','L','o','c','a','t','o','r',0}; static const WCHAR prop_dhcpenabledW[] = {'D','H','C','P','E','n','a','b','l','e','d',0}; static const WCHAR prop_directionW[] = @@ -613,8 +615,9 @@ static const struct column col_physicalmedia[] = }; static const struct column col_physicalmemory[] = { - { prop_capacityW, CIM_UINT64 }, - { prop_memorytypeW, CIM_UINT16, VT_I4 } + { prop_capacityW, CIM_UINT64 }, + { prop_devicelocatorW, CIM_STRING }, + { prop_memorytypeW, CIM_UINT16, VT_I4 } }; static const struct column col_pnpentity[] = { @@ -1037,8 +1040,9 @@ struct record_physicalmedia }; struct record_physicalmemory { - UINT64 capacity; - UINT16 memorytype; + UINT64 capacity; + const WCHAR *devicelocator; + UINT16 memorytype; }; struct record_pnpentity { @@ -2608,6 +2612,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st static enum fill_status fill_physicalmemory( struct table *table, const struct expr *cond ) { + static const WCHAR dimm0W[] = {'D','I','M','M',' ','0',0}; struct record_physicalmemory *rec; enum fill_status status = FILL_STATUS_UNFILTERED; UINT row = 0; @@ -2615,8 +2620,9 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; rec = (struct record_physicalmemory *)table->data; - rec->capacity = get_total_physical_memory(); - rec->memorytype = 9; /* RAM */ + rec->capacity = get_total_physical_memory(); + rec->devicelocator = heap_strdupW( dimm0W ); + rec->memorytype = 9; /* RAM */ if (!match_row( table, row, cond, &status )) free_row_values( table, row ); else row++; diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index 0fa6b5e..d19797c 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1438,6 +1438,7 @@ static void test_Win32_PhysicalMemory( IWbemServices *services ) { static const WCHAR capacityW[] = {'C','a','p','a','c','i','t','y',0}; static const WCHAR memorytypeW[] = {'M','e','m','o','r','y','T','y','p','e',0}; + static const WCHAR devicelocatorW[] = {'D','e','v','i','c','e','L','o','c','a','t','o','r',0}; static const WCHAR queryW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', 'P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; @@ -1472,6 +1473,15 @@ static void test_Win32_PhysicalMemory( IWbemServices *services ) type = 0xdeadbeef; VariantInit( &val ); + hr = IWbemClassObject_Get( obj, devicelocatorW, 0, &val, &type, NULL ); + ok( hr == S_OK, "failed to get devicelocator %08x\n", hr ); + ok( V_VT( &val ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &val ) ); + ok( type == CIM_STRING, "unexpected type 0x%x\n", type ); + trace( "devicelocator %s\n", wine_dbgstr_w(V_BSTR( &val )) ); + VariantClear( &val ); + + type = 0xdeadbeef; + VariantInit( &val ); hr = IWbemClassObject_Get( obj, memorytypeW, 0, &val, &type, NULL ); ok( hr == S_OK, "failed to get memory type %08x\n", hr ); ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) );
1
0
0
0
Louis Lenders : msi: Add MsiSourceListForceResolution{A,W} stub.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: 8dbcf21fcfe9ec6d62257ef20ebc35203aea0181 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8dbcf21fcfe9ec6d62257ef2…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Wed Mar 27 20:32:08 2019 +0100 msi: Add MsiSourceListForceResolution{A,W} stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46881
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2e95d2247d8fb83d040bdfce388ed4e96172427c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msi/msi.spec | 4 ++-- dlls/msi/source.c | 18 ++++++++++++++++++ include/msi.h | 4 ++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index aecba1b..447ec2c 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -205,8 +205,8 @@ 209 stdcall MsiSourceListClearAllW(wstr wstr long) 210 stdcall MsiSourceListAddSourceA(str str long str) 211 stdcall MsiSourceListAddSourceW(wstr wstr long wstr) -212 stub MsiSourceListForceResolutionA -213 stub MsiSourceListForceResolutionW +212 stdcall MsiSourceListForceResolutionA(str str long) +213 stdcall MsiSourceListForceResolutionW(wstr wstr long) 214 stdcall MsiIsProductElevatedA(str ptr) 215 stdcall MsiIsProductElevatedW(wstr ptr) 216 stdcall MsiGetShortcutTargetA(str ptr ptr ptr) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index e2cf7fc..af67362 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -1327,3 +1327,21 @@ UINT WINAPI MsiSourceListClearSourceW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR dwContext, dwOptions, debugstr_w(szSource)); return ERROR_SUCCESS; } + +/****************************************************************** + * MsiSourceListForceResolutionA (MSI.@) + */ +UINT WINAPI MsiSourceListForceResolutionA(const CHAR *product, const CHAR *user, DWORD reserved) +{ + FIXME("(%s %s %x)\n", debugstr_a(product), debugstr_a(user), reserved); + return ERROR_SUCCESS; +} + +/****************************************************************** + * MsiSourceListForceResolutionW (MSI.@) + */ +UINT WINAPI MsiSourceListForceResolutionW(const WCHAR *product, const WCHAR *user, DWORD reserved) +{ + FIXME("(%s %s %x)\n", debugstr_w(product), debugstr_w(user), reserved); + return ERROR_SUCCESS; +} diff --git a/include/msi.h b/include/msi.h index 417b606..604331a 100644 --- a/include/msi.h +++ b/include/msi.h @@ -672,6 +672,10 @@ UINT WINAPI MsiSourceListAddMediaDiskA(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR, LPCWSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPCWSTR, LPCWSTR); #define MsiSourceListAddMediaDisk WINELIB_NAME_AW(MsiSourceListAddMediaDisk) +UINT WINAPI MsiSourceListForceResolutionA(const CHAR*, const CHAR*, DWORD); +UINT WINAPI MsiSourceListForceResolutionW(const WCHAR*, const WCHAR*, DWORD); +#define MsiSourceListForceResolution WINELIB_NAME_AW(MsiSourceListForceResolution) + UINT WINAPI MsiEnumPatchesA(LPCSTR, DWORD, LPSTR, LPSTR, LPDWORD); UINT WINAPI MsiEnumPatchesW(LPCWSTR, DWORD, LPWSTR, LPWSTR, LPDWORD); #define MsiEnumPatches WINELIB_NAME_AW(MsiEnumPatches)
1
0
0
0
Gijs Vermeulen : msvcr120: Add [to]wctrans.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: d8116f5a6e1f140df1a5e16af6b944e25f84b188 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d8116f5a6e1f140df1a5e16a…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Thu Mar 21 16:30:21 2019 +0100 msvcr120: Add [to]wctrans. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46848
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 32290748247ceff1c2d55ddbe9f56311ad7a9abd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- .../api-ms-win-crt-convert-l1-1-0.spec | 2 +- .../api-ms-win-crt-string-l1-1-0.spec | 2 +- dlls/msvcr120/msvcr120.spec | 4 +-- dlls/msvcr120/tests/msvcr120.c | 37 ++++++++++++++++++++++ dlls/msvcr120_app/msvcr120_app.spec | 4 +-- dlls/msvcrt/locale.c | 27 ++++++++++++++++ dlls/msvcrt/msvcrt.h | 3 ++ dlls/ucrtbase/ucrtbase.spec | 4 +-- 8 files changed, 75 insertions(+), 8 deletions(-) diff --git a/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec b/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec index a72ec0a..1b877e3 100644 --- a/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec +++ b/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec @@ -119,4 +119,4 @@ @ cdecl wctob(long) ucrtbase.wctob @ cdecl wctomb(ptr long) ucrtbase.wctomb @ cdecl wctomb_s(ptr ptr long long) ucrtbase.wctomb_s -@ stub wctrans +@ cdecl wctrans(str) ucrtbase.wctrans diff --git a/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec b/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec index 0a61576..7854437 100644 --- a/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec +++ b/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec @@ -151,7 +151,7 @@ @ cdecl strxfrm(ptr str long) ucrtbase.strxfrm @ cdecl tolower(long) ucrtbase.tolower @ cdecl toupper(long) ucrtbase.toupper -@ stub towctrans +@ cdecl towctrans(long long) ucrtbase.towctrans @ cdecl towlower(long) ucrtbase.towlower @ cdecl towupper(long) ucrtbase.towupper @ cdecl wcscat(wstr wstr) ucrtbase.wcscat diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 4ddead9..1b6ef35 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2414,7 +2414,7 @@ @ cdecl tmpnam_s(ptr long) MSVCRT_tmpnam_s @ cdecl tolower(long) MSVCRT_tolower @ cdecl toupper(long) MSVCRT_toupper -@ stub towctrans +@ cdecl towctrans(long long) MSVCR120_towctrans @ cdecl towlower(long) MSVCRT_towlower @ cdecl towupper(long) MSVCRT_towupper @ cdecl trunc(double) MSVCR120_trunc @@ -2486,7 +2486,7 @@ @ cdecl wctob(long) MSVCRT_wctob @ cdecl wctomb(ptr long) MSVCRT_wctomb @ cdecl wctomb_s(ptr ptr long long) MSVCRT_wctomb_s -@ stub wctrans +@ cdecl wctrans(str) MSVCR120_wctrans @ cdecl wctype(str) @ cdecl wmemcpy_s(ptr long ptr long) @ cdecl wmemmove_s(ptr long ptr long) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 3077a18..be5df27 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -23,6 +23,7 @@ #include <stdio.h> #include <float.h> #include <limits.h> +#include <wctype.h> #include <windef.h> #include <winbase.h> @@ -205,6 +206,8 @@ static double (__cdecl *p_creal)(_Dcomplex); static double (__cdecl *p_nexttoward)(double, double); static float (__cdecl *p_nexttowardf)(float, double); static double (__cdecl *p_nexttowardl)(double, double); +static wctrans_t (__cdecl *p_wctrans)(const char*); +static wint_t (__cdecl *p_towctrans)(wint_t, wctrans_t); /* make sure we use the correct errno */ #undef errno @@ -268,6 +271,8 @@ static BOOL init(void) SET(p_nexttoward, "nexttoward"); SET(p_nexttowardf, "nexttowardf"); SET(p_nexttowardl, "nexttowardl"); + SET(p_wctrans, "wctrans"); + SET(p_towctrans, "towctrans"); if(sizeof(void*) == 8) { /* 64-bit initialization */ SET(p_critical_section_ctor, "??0critical_section@Concurrency@@QEAA@XZ"); @@ -1052,6 +1057,37 @@ static void test_nexttoward(void) ok(e == -1, "Expected no error, got %d.\n", e); } +static void test_towctrans(void) +{ + wchar_t ret; + + ret = p_wctrans("tolower"); + ok(ret == 2, "wctrans returned %d, expected 2\n", ret); + ret = p_wctrans("toupper"); + ok(ret == 1, "wctrans returned %d, expected 1\n", ret); + ret = p_wctrans("toLower"); + ok(ret == 0, "wctrans returned %d, expected 0\n", ret); + ret = p_wctrans(""); + ok(ret == 0, "wctrans returned %d, expected 0\n", ret); + if(0) { /* crashes on windows */ + ret = p_wctrans(NULL); + ok(ret == 0, "wctrans returned %d, expected 0\n", ret); + } + + ret = p_towctrans('t', 2); + ok(ret == 't', "towctrans('t', 2) returned %c, expected t\n", ret); + ret = p_towctrans('T', 2); + ok(ret == 't', "towctrans('T', 2) returned %c, expected t\n", ret); + ret = p_towctrans('T', 0); + ok(ret == 't', "towctrans('T', 0) returned %c, expected t\n", ret); + ret = p_towctrans('T', 3); + ok(ret == 't', "towctrans('T', 3) returned %c, expected t\n", ret); + ret = p_towctrans('t', 1); + ok(ret == 'T', "towctrans('t', 1) returned %c, expected T\n", ret); + ret = p_towctrans('T', 1); + ok(ret == 'T', "towctrans('T', 1) returned %c, expected T\n", ret); +} + START_TEST(msvcr120) { if (!init()) return; @@ -1072,4 +1108,5 @@ START_TEST(msvcr120) test_vsscanf(); test__Cbuild(); test_nexttoward(); + test_towctrans(); } diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 54de44b..c675595 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -2076,7 +2076,7 @@ @ cdecl tmpnam_s(ptr long) msvcr120.tmpnam_s @ cdecl tolower(long) msvcr120.tolower @ cdecl toupper(long) msvcr120.toupper -@ stub towctrans +@ cdecl towctrans(long long) msvcr120.towctrans @ cdecl towlower(long) msvcr120.towlower @ cdecl towupper(long) msvcr120.towupper @ cdecl trunc(double) msvcr120.trunc @@ -2148,7 +2148,7 @@ @ cdecl wctob(long) msvcr120.wctob @ cdecl wctomb(ptr long) msvcr120.wctomb @ cdecl wctomb_s(ptr ptr long long) msvcr120.wctomb_s -@ stub wctrans +@ cdecl wctrans(str) msvcr120.wctrans @ cdecl wctype(str) msvcr120.wctype @ cdecl wmemcpy_s(ptr long ptr long) msvcr120.wmemcpy_s @ cdecl wmemmove_s(ptr long ptr long) msvcr120.wmemmove_s diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index a1e827d..4282fed 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -2069,3 +2069,30 @@ BOOL msvcrt_init_locale(void) _setmbcp(_MB_CP_ANSI); return TRUE; } + +#if _MSVCR_VER >= 120 +/********************************************************************* + * wctrans (MSVCR120.@) + */ +MSVCRT_wctrans_t CDECL MSVCR120_wctrans(const char *property) +{ + static const char str_tolower[] = "tolower"; + static const char str_toupper[] = "toupper"; + + if(!strcmp(property, str_tolower)) + return 2; + if(!strcmp(property, str_toupper)) + return 1; + return 0; +} + +/********************************************************************* + * towctrans (MSVCR120.@) + */ +MSVCRT_wint_t CDECL MSVCR120_towctrans(MSVCRT_wint_t c, MSVCRT_wctrans_t category) +{ + if(category == 1) + return MSVCRT__towupper_l(c, NULL); + return MSVCRT__towlower_l(c, NULL); +} +#endif diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 2fb26b9..60d7b4f 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -63,6 +63,7 @@ typedef unsigned char MSVCRT_bool; typedef unsigned short MSVCRT_wchar_t; typedef unsigned short MSVCRT_wint_t; +typedef unsigned short MSVCRT_wctrans_t; typedef unsigned short MSVCRT_wctype_t; typedef unsigned short MSVCRT__ino_t; typedef unsigned int MSVCRT__fsize_t; @@ -1143,6 +1144,8 @@ void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_ const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg); int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t); int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t); +int __cdecl MSVCRT__towupper_l(MSVCRT_wint_t,MSVCRT__locale_t); +int __cdecl MSVCRT__towlower_l(MSVCRT_wint_t,MSVCRT__locale_t); int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t); int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 2e5e102..b951154 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2543,7 +2543,7 @@ @ cdecl tmpnam_s(ptr long) MSVCRT_tmpnam_s @ cdecl tolower(long) MSVCRT_tolower @ cdecl toupper(long) MSVCRT_toupper -@ stub towctrans +@ cdecl towctrans(long long) MSVCR120_towctrans @ cdecl towlower(long) MSVCRT_towlower @ cdecl towupper(long) MSVCRT_towupper @ cdecl trunc(double) MSVCR120_trunc @@ -2593,7 +2593,7 @@ @ cdecl wctob(long) MSVCRT_wctob @ cdecl wctomb(ptr long) MSVCRT_wctomb @ cdecl wctomb_s(ptr ptr long long) MSVCRT_wctomb_s -@ stub wctrans +@ cdecl wctrans(str) MSVCR120_wctrans @ cdecl wctype(str) @ cdecl wmemcpy_s(ptr long ptr long) @ cdecl wmemmove_s(ptr long ptr long)
1
0
0
0
Piotr Caban : msvcrt: Use correct locale when comparing strings in getenv.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: ff1ce89f624c2082a4bb8975efb7ba49bddf740a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ff1ce89f624c2082a4bb8975…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sun Mar 17 20:19:50 2019 +0100 msvcrt: Use correct locale when comparing strings in getenv. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b633777ed4d02821029a3b83fdb89fb6fbb66933) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/environ.c | 2 +- dlls/msvcrt/msvcrt.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index f48eabf..cce62bc 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -38,7 +38,7 @@ char * CDECL MSVCRT_getenv(const char *name) { char *str = *environ; char *pos = strchr(str,'='); - if (pos && ((pos - str) == length) && !strncasecmp(str,name,length)) + if (pos && ((pos - str) == length) && !MSVCRT__strnicmp(str,name,length)) { TRACE("(%s): got %s\n", debugstr_a(name), debugstr_a(pos + 1)); return pos + 1; diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 8654218..2fb26b9 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -1143,6 +1143,7 @@ void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_ const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg); int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t); int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t); +int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t); int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); unsigned int __cdecl MSVCRT__get_output_format(void);
1
0
0
0
Piotr Caban : msvcrt: Don't detect overflow in atol implementation.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: d3eecb9bf24fb8b5fc5141f28b006dcc6e89fc60 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d3eecb9bf24fb8b5fc5141f2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Mar 16 14:49:08 2019 +0100 msvcrt: Don't detect overflow in atol implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46845
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8c1684a50a56bdafe38fa5c685f6b367f8a44bc5) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/string.c | 4 ++++ dlls/msvcrt/tests/string.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index fc827d8..6751cf0 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1109,7 +1109,11 @@ MSVCRT_long CDECL MSVCRT__atol_l(const char *str, MSVCRT__locale_t locale) */ MSVCRT_long CDECL MSVCRT_atol(const char *str) { +#if _MSVCR_VER == 0 + return MSVCRT_atoi(str); +#else return MSVCRT__atol_l(str, NULL); +#endif } #if _MSVCR_VER>=120 diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index a159132..4af55e5 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3047,6 +3047,23 @@ static void test_atoi(void) ok(r == 0, "atoi(4294967296) = %d\n", r); } +static void test_atol(void) +{ + int r; + + r = atol("0"); + ok(r == 0, "atol(0) = %d\n", r); + + r = atol("-1"); + ok(r == -1, "atol(-1) = %d\n", r); + + r = atol("1"); + ok(r == 1, "atol(1) = %d\n", r); + + r = atol("4294967296"); + ok(r == 0, "atol(4294967296) = %d\n", r); +} + static void test_atof(void) { double d; @@ -3802,6 +3819,7 @@ START_TEST(string) test__stricmp(); test__wcstoi64(); test_atoi(); + test_atol(); test_atof(); test_strncpy(); test_strxfrm();
1
0
0
0
Zebediah Figura : msi: Return MSIDBSTATE_ERROR when MsiGetDatabaseState() is called from a custom action.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: b77e677474f29d6d47693a84b7090efcc2bbd79a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b77e677474f29d6d47693a84…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Mar 25 22:42:01 2019 -0500 msi: Return MSIDBSTATE_ERROR when MsiGetDatabaseState() is called from a custom action. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46812
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 60b1fd7e8764ab63d79382c1805d4c007a6be332) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msi/database.c | 13 ++----------- dlls/msi/tests/custom.c | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/dlls/msi/database.c b/dlls/msi/database.c index b8ec393..502a411 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -1887,17 +1887,8 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle ) TRACE("%d\n", handle); - db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); - if( !db ) - { - MSIHANDLE remote_database = msi_get_remote(handle); - if ( !remote_database ) - return MSIDBSTATE_ERROR; - - WARN("MsiGetDatabaseState not allowed during a custom action!\n"); - - return MSIDBSTATE_READ; - } + if (!(db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ))) + return MSIDBSTATE_ERROR; if (db->mode != MSIDBOPEN_READONLY ) ret = MSIDBSTATE_WRITE; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 6ae5bfc..9e9e2bf 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1119,7 +1119,7 @@ static void test_invalid_functions(MSIHANDLE hinst) UINT r; r = MsiGetDatabaseState(hinst); - todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); db = MsiGetActiveDatabase(hinst); ok(hinst, db, "MsiGetActiveDatabase failed\n"); @@ -1147,7 +1147,7 @@ static void test_invalid_functions(MSIHANDLE hinst) ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); r = MsiGetDatabaseState(db); - todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); r = MsiEnableUIPreview(db, &preview); todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
1
0
0
0
Zebediah Figura : msi/tests: Test calling more functions from custom actions.
by Alexandre Julliard
23 Aug '19
23 Aug '19
Module: wine Branch: stable Commit: f462faf675026e110433eeea79114ddb141c3ff0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f462faf675026e110433eeea…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Mar 25 22:42:00 2019 -0500 msi/tests: Test calling more functions from custom actions. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ae0298d46e8d4b7b689783b9c459ceafc3631780) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msi/tests/custom.c | 54 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index c7ce4d2..6ae5bfc 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1112,11 +1112,57 @@ static void test_costs(MSIHANDLE hinst) ok(hinst, sz == 2, "got size %u\n", sz); } +static void test_invalid_functions(MSIHANDLE hinst) +{ + char path[MAX_PATH], package_name[20]; + MSIHANDLE db, preview, package; + UINT r; + + r = MsiGetDatabaseState(hinst); + todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + + db = MsiGetActiveDatabase(hinst); + ok(hinst, db, "MsiGetActiveDatabase failed\n"); + + r = MsiDatabaseGenerateTransformA(db, db, "bogus.mst", 0, 0); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiDatabaseApplyTransformA(db, "bogus.mst", 0); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiCreateTransformSummaryInfoA(db, db, "bogus.mst", 0, 0); + todo_wine ok(hinst, r == ERROR_INSTALL_PACKAGE_OPEN_FAILED, "got %u\n", r); + + GetCurrentDirectoryA(sizeof(path), path); + r = MsiDatabaseExportA(db, "Test", path, "bogus.idt"); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiDatabaseImportA(db, path, "bogus.idt"); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiDatabaseCommit(db); + ok(hinst, r == ERROR_SUCCESS, "got %u\n", r); + + r = MsiDatabaseMergeA(db, db, "MergeErrors"); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiGetDatabaseState(db); + todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + + r = MsiEnableUIPreview(db, &preview); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + sprintf(package_name, "#%u", db); + r = MsiOpenPackageA(package_name, &package); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + MsiCloseHandle(db); +} + /* Main test. Anything that doesn't depend on a specific install configuration * or have undesired side effects should go here. */ UINT WINAPI main_test(MSIHANDLE hinst) { - UINT res; IUnknown *unk = NULL; HRESULT hr; @@ -1131,11 +1177,6 @@ UINT WINAPI main_test(MSIHANDLE hinst) ok(hinst, hr == S_OK, "got %#x\n", hr); CoUninitialize(); - /* Test MsiGetDatabaseState() */ - res = MsiGetDatabaseState(hinst); - todo_wine - ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res); - test_props(hinst); test_db(hinst); test_doaction(hinst); @@ -1144,6 +1185,7 @@ UINT WINAPI main_test(MSIHANDLE hinst) test_feature_states(hinst); test_format_record(hinst); test_costs(hinst); + test_invalid_functions(hinst); return ERROR_SUCCESS; }
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
71
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
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200