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
September 2018
----- 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
670 discussions
Start a n
N
ew thread
Zebediah Figura : devenum: Check for null pointer in IMoniker_BindToObject ().
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 2482b0f3e1028aebda04b7518e763ef60bd52541 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2482b0f3e1028aebda04b751…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Apr 28 12:30:09 2018 -0500 devenum: Check for null pointer in IMoniker_BindToObject(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8cd4d9fb47021badd0a9747c106dd9a18be207c9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/devenum/mediacatenum.c | 3 +++ dlls/devenum/tests/devenum.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index 0d4e01e..f5633b2 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -409,6 +409,9 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(IMoniker *iface, IBi TRACE("(%p)->(%p, %p, %s, %p)\n", This, pbc, pmkToLeft, debugstr_guid(riidResult), ppvResult); + if (!ppvResult) + return E_POINTER; + VariantInit(&var); *ppvResult = NULL; diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index 0437b6b..b52042d 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -109,6 +109,9 @@ static void test_devenum(IBindCtx *bind_ctx) } } + hr = IMoniker_BindToObject(moniker, bind_ctx, NULL, &IID_IUnknown, NULL); + ok(hr == E_POINTER, "got %#x\n", hr); + IPropertyBag_Release(prop_bag); IMoniker_Release(moniker); }
1
0
0
0
Zebediah Figura : devenum/tests: Test all registered categories.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: ecaa4f7385a98d82ee447e8a37271407e0545e45 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ecaa4f7385a98d82ee447e8a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 6 20:57:06 2018 -0600 devenum/tests: Test all registered categories. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d34637f597bcd9172ed2d47aaf70a30d4395523b) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/devenum/tests/devenum.c | 109 +++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index d9a799c..0437b6b 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -30,57 +30,56 @@ static const WCHAR friendly_name[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; static const WCHAR fcc_handlerW[] = {'F','c','c','H','a','n','d','l','e','r',0}; +static const WCHAR clsidW[] = {'C','L','S','I','D',0}; static const WCHAR mrleW[] = {'m','r','l','e',0}; -struct category -{ - const char * name; - const GUID * clsid; -}; - -static struct category am_categories[] = -{ - { "Legacy AM Filter category", &CLSID_LegacyAmFilterCategory }, - { "Audio renderer category", &CLSID_AudioRendererCategory }, - { "Midi renderer category", &CLSID_MidiRendererCategory }, - { "Audio input device category", &CLSID_AudioInputDeviceCategory }, - { "Video input device category", &CLSID_VideoInputDeviceCategory }, - { "Audio compressor category", &CLSID_AudioCompressorCategory }, - { "Video compressor category", &CLSID_VideoCompressorCategory } -}; - static void test_devenum(IBindCtx *bind_ctx) { - HRESULT res; + IEnumMoniker *enum_cat, *enum_moniker; ICreateDevEnum* create_devenum; - IEnumMoniker* enum_moniker = NULL; + IPropertyBag *prop_bag; + IMoniker *moniker; BOOL have_mrle = FALSE; - int i; + GUID cat_guid, clsid; + VARIANT var; + HRESULT hr; - res = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, + hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, &IID_ICreateDevEnum, (LPVOID*)&create_devenum); - if (res != S_OK) { - skip("Cannot create SystemDeviceEnum object (%x)\n", res); - return; - } + ok(hr == S_OK, "Failed to create devenum: %#x\n", hr); + + hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &CLSID_ActiveMovieCategories, &enum_cat, 0); + ok(hr == S_OK, "Failed to enum categories: %#x\n", hr); - for (i = 0; i < (sizeof(am_categories) / sizeof(struct category)); i++) + while (IEnumMoniker_Next(enum_cat, 1, &moniker, NULL) == S_OK) { + hr = IMoniker_BindToStorage(moniker, bind_ctx, NULL, &IID_IPropertyBag, (void **)&prop_bag); + ok(hr == S_OK, "IMoniker_BindToStorage failed: %#x\n", hr); + + VariantInit(&var); + hr = IPropertyBag_Read(prop_bag, friendly_name, &var, NULL); + ok(hr == S_OK, "Failed to read FriendlyName: %#x\n", hr); + if (winetest_debug > 1) - trace("%s:\n", am_categories[i].name); + trace("%s:\n", wine_dbgstr_w(V_BSTR(&var))); + + VariantClear(&var); + hr = IPropertyBag_Read(prop_bag, clsidW, &var, NULL); + ok(hr == S_OK, "Failed to read CLSID: %#x\n", hr); + + hr = CLSIDFromString(V_BSTR(&var), &cat_guid); + ok(hr == S_OK, "got %#x\n", hr); + + IPropertyBag_Release(prop_bag); + IMoniker_Release(moniker); - res = ICreateDevEnum_CreateClassEnumerator(create_devenum, am_categories[i].clsid, &enum_moniker, 0); - ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); - if (res == S_OK) + hr = ICreateDevEnum_CreateClassEnumerator(create_devenum, &cat_guid, &enum_moniker, 0); + ok(SUCCEEDED(hr), "Failed to enum devices: %#x\n", hr); + + if (hr == S_OK) { - IMoniker* moniker; while (IEnumMoniker_Next(enum_moniker, 1, &moniker, NULL) == S_OK) { - IPropertyBag* prop_bag = NULL; - VARIANT var; - HRESULT hr; - CLSID clsid = {0}; - hr = IMoniker_GetClassID(moniker, NULL); ok(hr == E_INVALIDARG, "IMoniker_GetClassID should failed %x\n", hr); @@ -93,36 +92,24 @@ static void test_devenum(IBindCtx *bind_ctx) hr = IMoniker_BindToStorage(moniker, bind_ctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag); ok(hr == S_OK, "IMoniker_BindToStorage failed with error %x\n", hr); - if (SUCCEEDED(hr)) - { - hr = IPropertyBag_Read(prop_bag, friendly_name, &var, NULL); - ok((hr == S_OK) || broken(hr == 0x80070002), "IPropertyBag_Read failed with error %x\n", hr); + hr = IPropertyBag_Read(prop_bag, friendly_name, &var, NULL); + ok(hr == S_OK, "IPropertyBag_Read failed: %#x\n", hr); - if (SUCCEEDED(hr)) - { - if (winetest_debug > 1) - trace(" %s\n", wine_dbgstr_w(V_BSTR(&var))); - VariantClear(&var); - } - else - { - trace(" ???\n"); - } + if (winetest_debug > 1) + trace(" %s\n", wine_dbgstr_w(V_BSTR(&var))); - if (IsEqualGUID(&CLSID_VideoCompressorCategory, am_categories[i].clsid)) { - /* Test well known compressor to ensure that we really enumerate codecs */ - hr = IPropertyBag_Read(prop_bag, fcc_handlerW, &var, NULL); - if (SUCCEEDED(hr)) { - ok(V_VT(&var) == VT_BSTR, "V_VT(var) = %d\n", V_VT(&var)); - if(!lstrcmpW(V_BSTR(&var), mrleW)) - have_mrle = TRUE; - VariantClear(&var); - } + if (IsEqualGUID(&CLSID_VideoCompressorCategory, &cat_guid)) { + /* Test well known compressor to ensure that we really enumerate codecs */ + hr = IPropertyBag_Read(prop_bag, fcc_handlerW, &var, NULL); + if (SUCCEEDED(hr)) { + ok(V_VT(&var) == VT_BSTR, "V_VT(var) = %d\n", V_VT(&var)); + if(!lstrcmpW(V_BSTR(&var), mrleW)) + have_mrle = TRUE; + VariantClear(&var); } } - if (prop_bag) - IPropertyBag_Release(prop_bag); + IPropertyBag_Release(prop_bag); IMoniker_Release(moniker); } IEnumMoniker_Release(enum_moniker);
1
0
0
0
Fabian Maurer : wineconsole: When loading settings for an application, respect a 0 in FontSize.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 7adf0d869c1b5abb2ef1dd3d8542c774ba97d99c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7adf0d869c1b5abb2ef1dd3d…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Apr 22 23:34:38 2018 +0200 wineconsole: When loading settings for an application, respect a 0 in FontSize. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 37654ceba8cf4bf2d654f94d51c7551f9f52af5c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/wineconsole/registry.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/programs/wineconsole/registry.c b/programs/wineconsole/registry.c index 080431a..92c53a7 100644 --- a/programs/wineconsole/registry.c +++ b/programs/wineconsole/registry.c @@ -126,8 +126,17 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg) count = sizeof(val); if (!RegQueryValueExW(hConKey, wszFontSize, 0, &type, (LPBYTE)&val, &count)) { - cfg->cell_height = HIWORD(val); - cfg->cell_width = LOWORD(val); + int height = HIWORD(val); + int width = LOWORD(val); + /* A value of zero reflects the default settings */ + if (height != 0) + { + cfg->cell_height = height; + } + if (width != 0) + { + cfg->cell_width = width; + } } count = sizeof(val);
1
0
0
0
Louis Lenders : winmm: Return error in waveInMessage if either dwParam1 or dwParam2 is null.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 55340f2d3ecd26e869b35b655cecbae21bc10a32 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=55340f2d3ecd26e869b35b65…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Wed May 2 10:02:15 2018 -0500 winmm: Return error in waveInMessage if either dwParam1 or dwParam2 is null. Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8dca6c35e11a104385242ed8346ee05707b78ef7) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winmm/tests/capture.c | 10 ++++++++++ dlls/winmm/waveform.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dlls/winmm/tests/capture.c b/dlls/winmm/tests/capture.c index 54c3793..fd4005c 100644 --- a/dlls/winmm/tests/capture.c +++ b/dlls/winmm/tests/capture.c @@ -661,6 +661,16 @@ static void wave_in_tests(void) ok((ndev == 0 && (preferred == -1 || broken(preferred != -1))) || preferred < ndev, "Got invalid preferred device: 0x%x\n", preferred); + rc = waveInMessage((HWAVEIN)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, + (DWORD_PTR)-1 , 0); + ok(rc == MMSYSERR_INVALPARAM || rc == MMSYSERR_BADDEVICEID, /* w2008+wvista */ + "waveInMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u\n", rc); + + rc = waveInMessage((HWAVEIN)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, + 0, (DWORD_PTR)&status); + ok(rc == MMSYSERR_INVALPARAM || rc == MMSYSERR_BADDEVICEID, /* w2008+wvista */ + "waveInMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u\n", rc); + rc=waveInGetDevCapsA(ndev+1,&capsA,sizeof(capsA)); ok(rc==MMSYSERR_BADDEVICEID, "waveInGetDevCapsA(%s): MMSYSERR_BADDEVICEID expected, got %s\n", diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 26fed17..045bf4a 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -3660,17 +3660,17 @@ UINT WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, case DRV_QUERYMAPPABLE: return MMSYSERR_NOERROR; case DRVM_MAPPER_PREFERRED_GET: - if(dwParam1) { - if(g_inmmdevices_count > 0) - /* Device 0 is always the default device */ - *(DWORD *)dwParam1 = 0; - else - *(DWORD *)dwParam1 = -1; - } + if(!dwParam1 || !dwParam2) + return MMSYSERR_INVALPARAM; - if(dwParam2) - /* Status flags */ - *(DWORD *)dwParam2 = 0; + if(g_inmmdevices_count > 0) + /* Device 0 is always the default device */ + *(DWORD *)dwParam1 = 0; + else + *(DWORD *)dwParam1 = -1; + + /* Status flags */ + *(DWORD *)dwParam2 = 0; return MMSYSERR_NOERROR; }
1
0
0
0
Louis Lenders : winmm: Return error in waveOutMessage if either dwParam1 or dwParam2 is null.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 511ac563ce8ba51ab35f0b8329233dd2c50f2994 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=511ac563ce8ba51ab35f0b83…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Tue Apr 24 11:52:18 2018 +0200 winmm: Return error in waveOutMessage if either dwParam1 or dwParam2 is null. Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d7bd861ae6d3ec24ff69def9ab7115ebb13d554d) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winmm/tests/wave.c | 10 ++++++++++ dlls/winmm/waveform.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c index a8a5e8d..284b624 100644 --- a/dlls/winmm/tests/wave.c +++ b/dlls/winmm/tests/wave.c @@ -1437,6 +1437,16 @@ static void wave_out_tests(void) ok((ndev == 0 && (preferred == -1 || broken(preferred != -1))) || preferred < ndev, "Got invalid preferred device: 0x%x\n", preferred); + rc = waveOutMessage((HWAVEOUT)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, + (DWORD_PTR)-1 , 0); + ok(rc == MMSYSERR_INVALPARAM || rc == MMSYSERR_BADDEVICEID, /* w2008+wvista */ + "waveOutMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u\n", rc); + + rc = waveOutMessage((HWAVEOUT)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, + 0, (DWORD_PTR)&status); + ok(rc == MMSYSERR_INVALPARAM || rc == MMSYSERR_BADDEVICEID, /* w2008+wvista */ + "waveOutMessage(DRVM_MAPPER_PREFERRED_GET) failed: %u\n", rc); + rc=waveOutGetDevCapsA(ndev+1,&capsA,sizeof(capsA)); ok(rc==MMSYSERR_BADDEVICEID, "waveOutGetDevCapsA(%s): MMSYSERR_BADDEVICEID expected, got %s\n", diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 7308519..26fed17 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -3262,17 +3262,17 @@ UINT WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, case DRV_QUERYMAPPABLE: return MMSYSERR_NOERROR; case DRVM_MAPPER_PREFERRED_GET: - if(dwParam1) { - if(g_outmmdevices_count > 0) - /* Device 0 is always the default device */ - *(DWORD *)dwParam1 = 0; - else - *(DWORD *)dwParam1 = -1; - } + if(!dwParam1 || !dwParam2) + return MMSYSERR_INVALPARAM; - if(dwParam2) - /* Status flags */ - *(DWORD *)dwParam2 = 0; + if(g_outmmdevices_count > 0) + /* Device 0 is always the default device */ + *(DWORD *)dwParam1 = 0; + else + *(DWORD *)dwParam1 = -1; + + /* Status flags */ + *(DWORD *)dwParam2 = 0; return MMSYSERR_NOERROR; }
1
0
0
0
Hans Leidekker : ws2_32: Enable IP_DONTFRAGMENT by default for SOCK_STREAM sockets.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: d47d5ec7ffcb19238826a375a24c5990dd098bde URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d47d5ec7ffcb19238826a375…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu May 10 11:30:10 2018 +0200 ws2_32: Enable IP_DONTFRAGMENT by default for SOCK_STREAM sockets. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 6d6b4bffb3f619ae298669b888775350223e281f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ws2_32/socket.c | 9 ++++++-- dlls/ws2_32/tests/sock.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1105282..43a623e 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -7513,9 +7513,14 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, if (ipxptype > 0) set_ipx_packettype(ret, ipxptype); - /* ensure IP_DONTFRAGMENT is disabled, in Linux the global default can be enabled */ if (unixaf == AF_INET || unixaf == AF_INET6) - set_dont_fragment(ret, unixaf == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, FALSE); + { + /* ensure IP_DONTFRAGMENT is disabled for SOCK_DGRAM and SOCK_RAW, enabled for SOCK_STREAM */ + if (unixtype == SOCK_DGRAM || unixtype == SOCK_RAW) /* in Linux the global default can be enabled */ + set_dont_fragment(ret, unixaf == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, FALSE); + else if (unixtype == SOCK_STREAM) + set_dont_fragment(ret, unixaf == AF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, TRUE); + } #ifdef IPV6_V6ONLY if (unixaf == AF_INET6) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 754c58b..b59c830 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1907,6 +1907,59 @@ todo_wine ok(value == 1, "Expected 1, got %d\n", value); closesocket(s); + + s = socket(family, SOCK_STREAM, 0); + if (s == INVALID_SOCKET && i) + { + skip("IPv6 is not supported\n"); + break; + } + ok(s != INVALID_SOCKET, "socket failed with error %d\n", GetLastError()); + + size = sizeof(value); + value = 0xdead; + err = getsockopt(s, level, IP_DONTFRAGMENT, (char *) &value, &size); + ok(!err, "Expected 0, got %d with error %d\n", err, GetLastError()); + ok(value == 1 || broken(value == 0) /* < vista */, "Expected 1, got %d\n", value); + + size = sizeof(value); + value = 0; + err = setsockopt(s, level, IP_DONTFRAGMENT, (char *) &value, size); + ok(!err, "Expected 0, got %d with error %d\n", err, GetLastError()); + + value = 0xdead; + err = getsockopt(s, level, IP_DONTFRAGMENT, (char *) &value, &size); + ok(!err, "Expected 0, got %d with error %d\n", err, GetLastError()); + ok(value == 0, "Expected 0, got %d\n", value); + + closesocket(s); + + s = socket(family, SOCK_RAW, 0); + if (s == INVALID_SOCKET) + { + if (WSAGetLastError() == WSAEACCES) skip("SOCK_RAW is not available\n"); + else if (i) skip("IPv6 is not supported\n"); + break; + } + ok(s != INVALID_SOCKET, "socket failed with error %d\n", GetLastError()); + + size = sizeof(value); + value = 0xdead; + err = getsockopt(s, level, IP_DONTFRAGMENT, (char *) &value, &size); + ok(!err, "Expected 0, got %d with error %d\n", err, GetLastError()); + ok(value == 0, "Expected 0, got %d\n", value); + + size = sizeof(value); + value = 1; + err = setsockopt(s, level, IP_DONTFRAGMENT, (char *) &value, size); + ok(!err, "Expected 0, got %d with error %d\n", err, GetLastError()); + + value = 0xdead; + err = getsockopt(s, level, IP_DONTFRAGMENT, (char *) &value, &size); + ok(!err, "Expected 0, got %d with error %d\n", err, GetLastError()); + ok(value == 1, "Expected 1, got %d\n", value); + + closesocket(s); } }
1
0
0
0
Alistair Leslie-Hughes : combase/tests: Add RoGetActivationFactory tests.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 159c4e74d5e900fcb3476e85827255f9f364d06d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=159c4e74d5e900fcb3476e85…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed May 2 03:42:50 2018 +0000 combase/tests: Add RoGetActivationFactory tests. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c5c37cf6b32fa57bb2427db4aa6f7896fe1951fc) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/combase/tests/Makefile.in | 1 + dlls/combase/tests/roapi.c | 112 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/dlls/combase/tests/Makefile.in b/dlls/combase/tests/Makefile.in index 3e7ecab..ca6c48f 100644 --- a/dlls/combase/tests/Makefile.in +++ b/dlls/combase/tests/Makefile.in @@ -1,4 +1,5 @@ TESTDLL = combase.dll C_SRCS = \ + roapi.c \ string.c diff --git a/dlls/combase/tests/roapi.c b/dlls/combase/tests/roapi.c new file mode 100644 index 0000000..3d46772 --- /dev/null +++ b/dlls/combase/tests/roapi.c @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2018 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#define COBJMACROS +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winstring.h" + +#include "initguid.h" +#include "roapi.h" + + +#include "wine/test.h" + +static HRESULT (WINAPI *pRoActivateInstance)(HSTRING, IInspectable **); +static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); +static void (WINAPI *pRoUninitialize)(void); +static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); + +static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); +static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); + +#define SET(x) p##x = (void*)GetProcAddress(hmod, #x) + +static BOOL init_functions(void) +{ + HMODULE hmod = LoadLibraryA("combase.dll"); + if (!hmod) + { + win_skip("Failed to load combase.dll, skipping tests\n"); + return FALSE; + } + SET(RoActivateInstance); + SET(RoInitialize); + SET(RoUninitialize); + SET(RoGetActivationFactory); + + SET(WindowsCreateString); + SET(WindowsDeleteString); + + return TRUE; +} + +static void test_ActivationFactories(void) +{ + static const WCHAR xmldocumentW[] = { 'W','i','n','d','o','w','s','.','D','a','t','a','.','X','m','l','.', + 'D','o','m','.','X','m','l','D','o','c','u','m','e','n','t',0 }; + static const WCHAR nonexistW[] = { 'D','o','e','s','.','N','o','t','.','E','x','i','s','t',0 }; + HRESULT hr; + HSTRING str, str2; + IActivationFactory *factory = NULL; + IInspectable *inspect = NULL; + + if(!pRoGetActivationFactory || !pRoActivateInstance) + { + win_skip("RoGetActivationFactory not available\n"); + return; + } + + hr = pWindowsCreateString(xmldocumentW, sizeof(xmldocumentW)/sizeof(WCHAR) - 1, &str); + ok(hr == S_OK, "got %08x\n", hr); + + hr = pWindowsCreateString(nonexistW, sizeof(nonexistW)/sizeof(WCHAR) - 1, &str2); + ok(hr == S_OK, "got %08x\n", hr); + + hr = pRoInitialize(RO_INIT_MULTITHREADED); + ok(hr == S_OK, "got %08x\n", hr); + + hr = pRoGetActivationFactory(str2, &IID_IActivationFactory, (void **)&factory); + todo_wine ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); + + hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + todo_wine ok(hr == S_OK, "got %08x\n", hr); + if(factory) + IActivationFactory_Release(factory); + + hr = pRoActivateInstance(str2, &inspect); + todo_wine ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); + + hr = pRoActivateInstance(str, &inspect); + todo_wine ok(hr == S_OK, "got %08x\n", hr); + if(inspect) + IInspectable_Release(inspect); + + pWindowsDeleteString(str); + pRoUninitialize(); +} + +START_TEST(roapi) +{ + if (!init_functions()) + return; + + test_ActivationFactories(); +}
1
0
0
0
Michael Müller : combase: Implement RoActivateInstance.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 74c2bc6a6658b483ad429a98112cc9abe6820801 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74c2bc6a6658b483ad429a98…
Author: Michael Müller <michael(a)fds-team.de> Date: Wed May 2 03:42:49 2018 +0000 combase: Implement RoActivateInstance. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit e5275c2f86bd6a1dea88ece3e636783c19c430ec) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- dlls/combase/combase.spec | 2 +- dlls/combase/roapi.c | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec index 74c9d27..978c3dc 100644 --- a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec +++ b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec @@ -1,4 +1,4 @@ -@ stub RoActivateInstance +@ stdcall RoActivateInstance(ptr ptr) combase.RoActivateInstance @ stdcall RoGetActivationFactory(ptr ptr ptr) combase.RoGetActivationFactory @ stub RoGetApartmentIdentifier @ stdcall RoInitialize(long) combase.RoInitialize diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index c238eb8..f42bdae 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -242,7 +242,7 @@ @ stdcall PropVariantClear(ptr) ole32.PropVariantClear @ stdcall PropVariantCopy(ptr ptr) ole32.PropVariantCopy @ stub ReleaseFuncDescs -@ stub RoActivateInstance +@ stdcall RoActivateInstance(ptr ptr) @ stub RoCaptureErrorContext @ stub RoClearError @ stub RoFailFastWithErrorContext diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index f7862fb..bfd07fb 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -198,3 +198,23 @@ HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, cons if (hiid) *hiid = INVALID_HANDLE_VALUE; return E_NOTIMPL; } + +/*********************************************************************** + * RoActivateInstance (combase.@) + */ +HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance) +{ + IActivationFactory *factory; + HRESULT hr; + + FIXME("(%p, %p): semi-stub\n", classid, instance); + + hr = RoGetActivationFactory(classid, &IID_IActivationFactory, (void **)&factory); + if (SUCCEEDED(hr)) + { + hr = IActivationFactory_ActivateInstance(factory, instance); + IActivationFactory_Release(factory); + } + + return hr; +}
1
0
0
0
Michael Müller : combase: Implement RoGetActivationFactory.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 1ca720a98c04190975ef237b6f5c14e7e6535337 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ca720a98c04190975ef237b…
Author: Michael Müller <michael(a)fds-team.de> Date: Wed May 2 03:42:47 2018 +0000 combase: Implement RoGetActivationFactory. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit e6c0dd3bed8dd716bb39a81c46f4d505bf783493) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/combase/Makefile.in | 2 +- dlls/combase/roapi.c | 139 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 135 insertions(+), 6 deletions(-) diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index b1d759e..df051ad 100644 --- a/dlls/combase/Makefile.in +++ b/dlls/combase/Makefile.in @@ -1,5 +1,5 @@ MODULE = combase.dll -IMPORTS = ole32 uuid +IMPORTS = advapi32 ole32 uuid C_SRCS = \ roapi.c \ diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index a2d62520..f7862fb 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -1,5 +1,6 @@ /* * Copyright 2014 Martin Storsjo + * Copyright 2016 Michael Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,16 +16,96 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - +#define COBJMACROS #include "objbase.h" +#include "initguid.h" #include "roapi.h" #include "roparameterizediid.h" -#include "hstring.h" +#include "winstring.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(combase); +static const char *debugstr_hstring(HSTRING hstr) +{ + const WCHAR *str; + UINT32 len; + if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)"; + str = WindowsGetStringRawBuffer(hstr, &len); + return wine_dbgstr_wn(str, len); +} + +static HRESULT get_library_for_classid(const WCHAR *classid, WCHAR **out) +{ + static const WCHAR classkeyW[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','R','u','n','t','i','m','e','\\', + 'A','c','t','i','v','a','t','a','b','l','e','C','l','a','s','s','I','d',0}; + static const WCHAR dllpathW[] = {'D','l','l','P','a','t','h',0}; + HKEY hkey_root, hkey_class; + DWORD type, size; + HRESULT hr; + WCHAR *buf = NULL; + + *out = NULL; + + /* load class registry key */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, classkeyW, 0, KEY_READ, &hkey_root)) + return REGDB_E_READREGDB; + if (RegOpenKeyExW(hkey_root, classid, 0, KEY_READ, &hkey_class)) + { + WARN("Class %s not found in registry\n", debugstr_w(classid)); + RegCloseKey(hkey_root); + return REGDB_E_CLASSNOTREG; + } + RegCloseKey(hkey_root); + + /* load (and expand) DllPath registry value */ + if (RegQueryValueExW(hkey_class, dllpathW, NULL, &type, NULL, &size)) + { + hr = REGDB_E_READREGDB; + goto done; + } + if (type != REG_SZ && type != REG_EXPAND_SZ) + { + hr = REGDB_E_READREGDB; + goto done; + } + if (!(buf = HeapAlloc(GetProcessHeap(), 0, size))) + { + hr = E_OUTOFMEMORY; + goto done; + } + if (RegQueryValueExW(hkey_class, dllpathW, NULL, NULL, (BYTE *)buf, &size)) + { + hr = REGDB_E_READREGDB; + goto done; + } + if (type == REG_EXPAND_SZ) + { + WCHAR *expanded; + DWORD len = ExpandEnvironmentStringsW(buf, NULL, 0); + if (!(expanded = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + { + hr = E_OUTOFMEMORY; + goto done; + } + ExpandEnvironmentStringsW(buf, expanded, len); + HeapFree(GetProcessHeap(), 0, buf); + buf = expanded; + } + + *out = buf; + return S_OK; + +done: + HeapFree(GetProcessHeap(), 0, buf); + RegCloseKey(hkey_class); + return hr; +} + + /*********************************************************************** * RoInitialize (combase.@) */ @@ -51,10 +132,58 @@ void WINAPI RoUninitialize(void) /*********************************************************************** * RoGetActivationFactory (combase.@) */ -HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **factory) +HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory) { - FIXME("stub: %p %p %p\n", classid, iid, factory); - return E_NOTIMPL; + PFNGETACTIVATIONFACTORY pDllGetActivationFactory; + IActivationFactory *factory; + WCHAR *library; + HMODULE module; + HRESULT hr; + + FIXME("(%s, %s, %p): semi-stub\n", debugstr_hstring(classid), debugstr_guid(iid), class_factory); + + if (!iid || !class_factory) + return E_INVALIDARG; + + hr = get_library_for_classid(WindowsGetStringRawBuffer(classid, NULL), &library); + if (FAILED(hr)) + { + ERR("Failed to find library for %s\n", debugstr_hstring(classid)); + return hr; + } + + if (!(module = LoadLibraryW(library))) + { + ERR("Failed to load module %s\n", debugstr_w(library)); + hr = HRESULT_FROM_WIN32(GetLastError()); + goto done; + } + + if (!(pDllGetActivationFactory = (void *)GetProcAddress(module, "DllGetActivationFactory"))) + { + ERR("Module %s does not implement DllGetActivationFactory\n", debugstr_w(library)); + hr = E_FAIL; + goto done; + } + + TRACE("Found library %s for class %s\n", debugstr_w(library), debugstr_hstring(classid)); + + hr = pDllGetActivationFactory(classid, &factory); + if (SUCCEEDED(hr)) + { + hr = IActivationFactory_QueryInterface(factory, iid, class_factory); + if (SUCCEEDED(hr)) + { + TRACE("Created interface %p\n", *class_factory); + module = NULL; + } + IActivationFactory_Release(factory); + } + +done: + HeapFree(GetProcessHeap(), 0, library); + if (module) FreeLibrary(module); + return hr; } /***********************************************************************
1
0
0
0
Michael Müller : include/roapi.h: Add further typedefs.
by Alexandre Julliard
13 Sep '18
13 Sep '18
Module: wine Branch: stable Commit: 547c470343d637dd36f169c7115bc737599f23d5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=547c470343d637dd36f169c7…
Author: Michael Müller <michael(a)fds-team.de> Date: Fri Apr 20 00:28:41 2018 +0000 include/roapi.h: Add further typedefs. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2942e47dc907fee87595d6a4dcc4f59537e7aa74) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- include/roapi.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/roapi.h b/include/roapi.h index 0421fe9..9f717e8 100644 --- a/include/roapi.h +++ b/include/roapi.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2014 Martin Storsjo + * Copyright (C) 2016 Michael Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,6 +21,7 @@ #define __WINE_ROAPI_H #include <windef.h> +#include <activation.h> typedef enum { @@ -27,6 +29,15 @@ typedef enum RO_INIT_MULTITHREADED = 1, } RO_INIT_TYPE; +DECLARE_HANDLE(APARTMENT_SHUTDOWN_REGISTRATION_COOKIE); + +#ifdef __cplusplus +typedef struct {} *RO_REGISTRATION_COOKIE; +#else +typedef struct _RO_REGISTRATION_COOKIE *RO_REGISTRATION_COOKIE; +#endif +typedef HRESULT (WINAPI *PFNGETACTIVATIONFACTORY)(HSTRING, IActivationFactory **); + #ifdef __cplusplus extern "C" { #endif
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
...
67
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
Results per page:
10
25
50
100
200