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
March 2014
----- 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
530 discussions
Start a n
N
ew thread
Michael Stefaniuc : dmloader/tests: Add COM tests for DirectMusicContainer.
by Alexandre Julliard
13 Mar '14
13 Mar '14
Module: wine Branch: master Commit: a539e13f23e92eec195964ad6a5b49c030994185 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a539e13f23e92eec195964ad6…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 12 23:14:41 2014 +0100 dmloader/tests: Add COM tests for DirectMusicContainer. --- dlls/dmloader/tests/loader.c | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c index 1105afa..273149d 100644 --- a/dlls/dmloader/tests/loader.c +++ b/dlls/dmloader/tests/loader.c @@ -169,6 +169,55 @@ static void test_COM(void) while (IDirectMusicLoader8_Release(dml8)); } +static void test_COM_container(void) +{ + IDirectMusicContainer *dmc = (IDirectMusicContainer*)0xdeadbeef; + IDirectMusicObject *dmo; + IPersistStream *ps; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicContainer, (IUnknown*)&dmc, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dmc); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicContainer create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dmc, "dmc = %p\n", dmc); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicContainer, NULL, CLSCTX_INPROC_SERVER, + &IID_IClassFactory, (void**)&dmc); + ok(hr == E_NOINTERFACE, "DirectMusicContainer create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all DirectMusicContainer interfaces */ + hr = CoCreateInstance(&CLSID_DirectMusicContainer, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicContainer, (void**)&dmc); + ok(hr == S_OK, "DirectMusicContainer create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicContainer_AddRef(dmc); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicContainer_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo); + ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr); + refcount = IDirectMusicObject_AddRef(dmo); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IDirectMusicObject_Release(dmo); + + hr = IDirectMusicContainer_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps); + ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); + refcount = IPersistStream_AddRef(ps); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + refcount = IPersistStream_Release(ps); + + hr = IDirectMusicContainer_QueryInterface(dmc, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + refcount = IUnknown_Release(unk); + + while (IDirectMusicContainer_Release(dmc)); +} + START_TEST(loader) { CoInitialize(NULL); @@ -182,5 +231,6 @@ START_TEST(loader) test_release_object(); test_simple_playing(); test_COM(); + test_COM_container(); CoUninitialize(); }
1
0
0
0
Michael Stefaniuc : dmloader: Don' t crash on container destruction if it was never loaded.
by Alexandre Julliard
13 Mar '14
13 Mar '14
Module: wine Branch: master Commit: e1676fc989471fd551f4e0654eefad783440ea1c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1676fc989471fd551f4e0654…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 12 23:10:12 2014 +0100 dmloader: Don't crash on container destruction if it was never loaded. --- dlls/dmloader/container.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/dmloader/container.c b/dlls/dmloader/container.c index f53a074..4fb5f97 100644 --- a/dlls/dmloader/container.c +++ b/dlls/dmloader/container.c @@ -68,7 +68,6 @@ static HRESULT destroy_dmcontainer(IDirectMusicContainerImpl *This) IStream_Release (This->pStream); /* FIXME: release allocated entries */ - unlock_module(); return S_OK; } @@ -108,8 +107,10 @@ static ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_Release (LPD DWORD dwRef = InterlockedDecrement (&This->dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef); if (dwRef == 0) { - destroy_dmcontainer(This); + if (This->pStream) + destroy_dmcontainer(This); HeapFree(GetProcessHeap(), 0, This); + unlock_module(); } return dwRef;
1
0
0
0
Michael Stefaniuc : dmloader: Pass the object to the IDirectMusicContainer_Release helper.
by Alexandre Julliard
13 Mar '14
13 Mar '14
Module: wine Branch: master Commit: c600be1ff50cdcb1fbdf4757dac3a710a694ee8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c600be1ff50cdcb1fbdf4757d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 12 23:07:09 2014 +0100 dmloader: Pass the object to the IDirectMusicContainer_Release helper. --- dlls/dmloader/container.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dmloader/container.c b/dlls/dmloader/container.c index 871c8b0..f53a074 100644 --- a/dlls/dmloader/container.c +++ b/dlls/dmloader/container.c @@ -36,8 +36,8 @@ static ULONG WINAPI IDirectMusicContainerImpl_IPersistStream_AddRef (LPPERSISTST */ /* IUnknown/IDirectMusicContainer part: */ -static HRESULT DMUSIC_DestroyDirectMusicContainerImpl (LPDIRECTMUSICCONTAINER iface) { - ICOM_THIS_MULTI(IDirectMusicContainerImpl, ContainerVtbl, iface); +static HRESULT destroy_dmcontainer(IDirectMusicContainerImpl *This) +{ LPDIRECTMUSICLOADER pLoader; LPDIRECTMUSICGETLOADER pGetLoader; struct list *pEntry; @@ -108,7 +108,7 @@ static ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_Release (LPD DWORD dwRef = InterlockedDecrement (&This->dwRef); TRACE("(%p): ReleaseRef to %d\n", This, dwRef); if (dwRef == 0) { - DMUSIC_DestroyDirectMusicContainerImpl (iface); + destroy_dmcontainer(This); HeapFree(GetProcessHeap(), 0, This); }
1
0
0
0
Michael Stefaniuc : dmloader: Add COM tests for DirectMusicLoader.
by Alexandre Julliard
13 Mar '14
13 Mar '14
Module: wine Branch: master Commit: 9cb38a4ad0b9943c8699e6c9795253ac53616f97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9cb38a4ad0b9943c8699e6c97…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 12 23:04:09 2014 +0100 dmloader: Add COM tests for DirectMusicLoader. --- dlls/dmloader/tests/loader.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c index 3d8dd80..1105afa 100644 --- a/dlls/dmloader/tests/loader.c +++ b/dlls/dmloader/tests/loader.c @@ -134,6 +134,41 @@ static void test_simple_playing(void) IDirectMusicLoader8_Release(loader); } +static void test_COM(void) +{ + IDirectMusicLoader8 *dml8 = (IDirectMusicLoader8*)0xdeadbeef; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicLoader, (IUnknown*)&dml8, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dml8); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicLoader create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dml8, "dml8 = %p\n", dml8); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicObject, (void**)&dml8); + ok(hr == E_NOINTERFACE, "DirectMusicLoader create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all DirectMusicLoader interfaces */ + hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicLoader8, (void**)&dml8); + ok(hr == S_OK, "DirectMusicLoader create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicLoader8_AddRef(dml8); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicLoader8_QueryInterface(dml8, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IUnknown_Release(unk); + + while (IDirectMusicLoader8_Release(dml8)); +} + START_TEST(loader) { CoInitialize(NULL); @@ -146,5 +181,6 @@ START_TEST(loader) } test_release_object(); test_simple_playing(); + test_COM(); CoUninitialize(); }
1
0
0
0
Michael Stefaniuc : dmloader/tests: Centralize the skip().
by Alexandre Julliard
13 Mar '14
13 Mar '14
Module: wine Branch: master Commit: 82f771e34768b4914bb5cbaeec7cde28be15689e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82f771e34768b4914bb5cbaee…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 12 23:00:53 2014 +0100 dmloader/tests: Centralize the skip(). --- dlls/dmloader/tests/loader.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c index 8759033..3d8dd80 100644 --- a/dlls/dmloader/tests/loader.c +++ b/dlls/dmloader/tests/loader.c @@ -27,17 +27,26 @@ static unsigned char rifffile[8+4+8+16+8+256] = "RIFF\x24\x01\x00\x00WAVE" /* he "fmt \x10\x00\x00\x00\x01\x00\x20\x00\xAC\x44\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00" /* format segment: PCM, 2 chan, 44100 Hz, 16 bits */ "data\x00\x01\x00\x00"; /* 256 byte data segment (silence) */ +static BOOL missing_dmloader(void) +{ + IDirectMusicLoader *dml; + HRESULT hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicLoader, (void**)&dml); + + if (hr == S_OK && dml) + { + IDirectMusicLoader_Release(dml); + return FALSE; + } + return TRUE; +} + static void test_release_object(void) { HRESULT hr; IDirectMusicLoader8* loader = NULL; hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, &IID_IDirectMusicLoader8, (void**)&loader); - if ( FAILED(hr) ) - { - skip("CoCreateInstance failed.\n"); - return; - } hr = IDirectMusicLoader_ReleaseObject(loader, NULL); ok(hr == E_POINTER, "Expected E_POINTER, received %#x\n", hr); @@ -128,6 +137,13 @@ static void test_simple_playing(void) START_TEST(loader) { CoInitialize(NULL); + + if (missing_dmloader()) + { + skip("dmloader not available\n"); + CoUninitialize(); + return; + } test_release_object(); test_simple_playing(); CoUninitialize();
1
0
0
0
Michael Stefaniuc : dmloader: None of the COM classes support aggregation.
by Alexandre Julliard
13 Mar '14
13 Mar '14
Module: wine Branch: master Commit: 917d5eabe64f34bb3dcae1c65c02a93829f2174a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=917d5eabe64f34bb3dcae1c65…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 12 22:58:17 2014 +0100 dmloader: None of the COM classes support aggregation. --- dlls/dmloader/container.c | 3 ++- dlls/dmloader/dmloader_main.c | 18 +++++++++++------- dlls/dmloader/dmloader_private.h | 4 ++-- dlls/dmloader/loader.c | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/dmloader/container.c b/dlls/dmloader/container.c index 68ee573..871c8b0 100644 --- a/dlls/dmloader/container.c +++ b/dlls/dmloader/container.c @@ -909,7 +909,8 @@ static const IPersistStreamVtbl DirectMusicContainer_PersistStream_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicContainerImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmcontainer(REFIID lpcGUID, void **ppobj) +{ IDirectMusicContainerImpl* obj; obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicContainerImpl)); diff --git a/dlls/dmloader/dmloader_main.c b/dlls/dmloader/dmloader_main.c index eaed633..38faa8e 100644 --- a/dlls/dmloader/dmloader_main.c +++ b/dlls/dmloader/dmloader_main.c @@ -27,7 +27,7 @@ LONG module_ref = 0; typedef struct { IClassFactory IClassFactory_iface; - HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv, IUnknown *pUnkOuter); + HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv); } IClassFactoryImpl; /****************************************************************** @@ -73,13 +73,18 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) } static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, - REFIID riid, void **ppv) + REFIID riid, void **ret_iface) { IClassFactoryImpl *This = impl_from_IClassFactory(iface); - TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv); + TRACE ("(%s, %p)\n", debugstr_dmguid(riid), ret_iface); - return This->fnCreateInstance(riid, ppv, pUnkOuter); + if (pUnkOuter) { + *ret_iface = NULL; + return CLASS_E_NOAGGREGATION; + } + + return This->fnCreateInstance(riid, ret_iface); } static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) @@ -102,9 +107,8 @@ static const IClassFactoryVtbl classfactory_vtbl = { ClassFactory_LockServer }; -static IClassFactoryImpl dm_loader_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicLoaderImpl}; -static IClassFactoryImpl dm_container_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicContainerImpl}; +static IClassFactoryImpl dm_loader_CF = {{&classfactory_vtbl}, create_dmloader}; +static IClassFactoryImpl dm_container_CF = {{&classfactory_vtbl}, create_dmcontainer}; /****************************************************************** * DllMain diff --git a/dlls/dmloader/dmloader_private.h b/dlls/dmloader/dmloader_private.h index e393080..f01acfc 100644 --- a/dlls/dmloader/dmloader_private.h +++ b/dlls/dmloader/dmloader_private.h @@ -65,8 +65,8 @@ typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream; /***************************************************************************** * Creation helpers */ -extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicContainerImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmloader(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmcontainer(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID *ppobj) DECLSPEC_HIDDEN; extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID *ppobj) DECLSPEC_HIDDEN; extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID *ppobj) DECLSPEC_HIDDEN; diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 39f00a0..967b093 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -888,14 +888,14 @@ static HRESULT DMUSIC_GetDefaultGMPath (WCHAR wszPath[MAX_PATH]) { } /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderImpl(const GUID *lpcGUID, void **ppobj, IUnknown *pUnkOuter) +HRESULT WINAPI create_dmloader(REFIID lpcGUID, void **ppobj) { IDirectMusicLoaderImpl *obj; DMUS_OBJECTDESC Desc; LPWINE_LOADER_ENTRY pDefaultDLSEntry; struct list *pEntry; - TRACE("(%s, %p, %p)\n", debugstr_dmguid(lpcGUID), ppobj, pUnkOuter); + TRACE("(%s, %p)\n", debugstr_dmguid(lpcGUID), ppobj); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderImpl)); if (NULL == obj) { *ppobj = NULL;
1
0
0
0
Zhenbo Li : mshtml: Added IHTMLTableRow::align property implementation.
by Alexandre Julliard
12 Mar '14
12 Mar '14
Module: wine Branch: master Commit: 7442abde9257022fcf9f178be8284826d445986a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7442abde9257022fcf9f178be…
Author: Zhenbo Li <litimetal(a)gmail.com> Date: Wed Mar 12 13:11:32 2014 +0800 mshtml: Added IHTMLTableRow::align property implementation. --- dlls/mshtml/htmltablerow.c | 27 +++++++++++++++++++++++---- dlls/mshtml/tests/dom.c | 13 +++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmltablerow.c b/dlls/mshtml/htmltablerow.c index 7274ded..ef01763 100644 --- a/dlls/mshtml/htmltablerow.c +++ b/dlls/mshtml/htmltablerow.c @@ -102,15 +102,34 @@ static HRESULT WINAPI HTMLTableRow_Invoke(IHTMLTableRow *iface, DISPID dispIdMem static HRESULT WINAPI HTMLTableRow_put_align(IHTMLTableRow *iface, BSTR v) { HTMLTableRow *This = impl_from_IHTMLTableRow(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString val; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&val, v); + + nsres = nsIDOMHTMLTableRowElement_SetAlign(This->nsrow, &val); + nsAString_Finish(&val); + if (NS_FAILED(nsres)){ + ERR("Set Align(%s) failed!\n", debugstr_w(v)); + return E_FAIL; + } + return S_OK; } static HRESULT WINAPI HTMLTableRow_get_align(IHTMLTableRow *iface, BSTR *p) { HTMLTableRow *This = impl_from_IHTMLTableRow(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString val; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&val, NULL); + nsres = nsIDOMHTMLTableRowElement_GetAlign(This->nsrow, &val); + + return return_nsstr(nsres, &val, p); } static HRESULT WINAPI HTMLTableRow_put_vAlign(IHTMLTableRow *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index cf78450..b485203 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5576,6 +5576,7 @@ static void test_tr_elem(IHTMLElement *elem) IHTMLElementCollection *col; IHTMLTableRow *row; HRESULT hres; + BSTR bstr; static const elem_type_t cell_types[] = {ET_TD,ET_TD}; @@ -5592,6 +5593,18 @@ static void test_tr_elem(IHTMLElement *elem) test_elem_collection((IUnknown*)col, cell_types, sizeof(cell_types)/sizeof(*cell_types)); IHTMLElementCollection_Release(col); + bstr = a2bstr("left"); + hres = IHTMLTableRow_put_align(row, bstr); + ok(hres == S_OK, "set_align failed: %08x\n", hres); + SysFreeString(bstr); + + bstr = NULL; + hres = IHTMLTableRow_get_align(row, &bstr); + ok(hres == S_OK, "get_align failed: %08x\n", hres); + ok(bstr != NULL, "get_align returned NULL\n"); + ok(!strcmp_wa(bstr, "left"), "get_align returned %s\n", wine_dbgstr_w(bstr)); + SysFreeString(bstr); + IHTMLTableRow_Release(row); }
1
0
0
0
Akihiro Sagawa : gdi32: Improve the font enumeration order for complex script locales.
by Alexandre Julliard
12 Mar '14
12 Mar '14
Module: wine Branch: master Commit: 04e8b00ab08a046f52ffbbd841b17b10b3bf720a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04e8b00ab08a046f52ffbbd84…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri Mar 7 01:22:19 2014 +0900 gdi32: Improve the font enumeration order for complex script locales. --- dlls/gdi32/freetype.c | 11 ++++++++++- dlls/gdi32/tests/font.c | 14 +++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 5f4a570..cece358 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5527,12 +5527,20 @@ static INT load_script_name( UINT id, WCHAR buffer[LF_FACESIZE] ) return i; } +static inline BOOL is_complex_script_ansi_cp(UINT ansi_cp) +{ + return (ansi_cp == 874 /* Thai */ + || ansi_cp == 1255 /* Hebrew */ + || ansi_cp == 1256 /* Arabic */ + ); +} /*************************************************** * create_enum_charset_list * * This function creates charset enumeration list because in DEFAULT_CHARSET * case, the ANSI codepage's charset takes precedence over other charsets. + * Above rule doesn't apply if the ANSI codepage uses complex script (e.g. Thai). * This function works as a filter other than DEFAULT_CHARSET case. */ static DWORD create_enum_charset_list(DWORD charset, struct enum_charset_list *list) @@ -5553,7 +5561,8 @@ static DWORD create_enum_charset_list(DWORD charset, struct enum_charset_list *l /* Set the current codepage's charset as the first element. */ acp = GetACP(); - if (TranslateCharsetInfo((DWORD*)(INT_PTR)acp, &csi, TCI_SRCCODEPAGE) && + if (!is_complex_script_ansi_cp(acp) && + TranslateCharsetInfo((DWORD*)(INT_PTR)acp, &csi, TCI_SRCCODEPAGE) && csi.fs.fsCsb[0] != 0) { list->element[n].mask = csi.fs.fsCsb[0]; list->element[n].charset = csi.ciCharset; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index daa160c..a9d2fb0 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2957,7 +2957,7 @@ static INT CALLBACK enum_multi_charset_font_proc(const LOGFONTA *lf, const TEXTM if (TranslateCharsetInfo(ULongToPtr(target->lfCharSet), &csi, TCI_SRCCHARSET)) { fs = ntm->ntmFontSig.fsCsb[0] & valid_bits; - if ((fs & csi.fs.fsCsb[0]) && (fs & ~csi.fs.fsCsb[0])) { + if ((fs & csi.fs.fsCsb[0]) && (fs & ~csi.fs.fsCsb[0]) && (fs & FS_LATIN1)) { *target = *lf; return FALSE; } @@ -2998,13 +2998,13 @@ static void test_EnumFontFamiliesEx_default_charset(void) { struct enum_font_data efd; LOGFONTA target, enum_font; - DWORD ret; + UINT acp; HDC hdc; CHARSETINFO csi; - ret = GetACP(); - if (!TranslateCharsetInfo(ULongToPtr(ret), &csi, TCI_SRCCODEPAGE)) { - skip("TranslateCharsetInfo failed for code page %d.\n", ret); + acp = GetACP(); + if (!TranslateCharsetInfo(ULongToPtr(acp), &csi, TCI_SRCCODEPAGE)) { + skip("TranslateCharsetInfo failed for code page %u.\n", acp); return; } @@ -3018,6 +3018,10 @@ static void test_EnumFontFamiliesEx_default_charset(void) skip("suitable font isn't found for charset %d.\n", enum_font.lfCharSet); return; } + if (acp == 874 || acp == 1255 || acp == 1256) { + /* these codepage use complex script, expecting ANSI_CHARSET here. */ + target.lfCharSet = ANSI_CHARSET; + } efd.total = 0; memset(&enum_font, 0, sizeof(enum_font));
1
0
0
0
Vincent Povirk : user32: Create popup menu windows before WM_ENTERMENULOOP.
by Alexandre Julliard
12 Mar '14
12 Mar '14
Module: wine Branch: master Commit: a07966dba809d18416e818e1dec80d5fe7dbe326 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a07966dba809d18416e818e1d…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Feb 26 15:08:11 2014 -0600 user32: Create popup menu windows before WM_ENTERMENULOOP. --- dlls/user32/menu.c | 90 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 29 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 915b1c5..8bb508d 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -1817,6 +1817,41 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd ) /*********************************************************************** + * MENU_InitPopup + * + * Popup menu initialization before WM_ENTERMENULOOP. + */ +static BOOL MENU_InitPopup( HWND hwndOwner, HMENU hmenu, UINT flags ) +{ + POPUPMENU *menu; + DWORD ex_style = 0; + + TRACE("owner=%p hmenu=%p\n", hwndOwner, hmenu); + + if (!(menu = MENU_GetMenu( hmenu ))) return FALSE; + + /* store the owner for DrawItem */ + if (!IsWindow( hwndOwner )) + { + SetLastError( ERROR_INVALID_WINDOW_HANDLE ); + return FALSE; + } + menu->hwndOwner = hwndOwner; + + if (flags & TPM_LAYOUTRTL) + ex_style = WS_EX_LAYOUTRTL; + + /* NOTE: In Windows, top menu popup is not owned. */ + menu->hWnd = CreateWindowExW( ex_style, (LPCWSTR)POPUPMENU_CLASS_ATOM, NULL, + WS_POPUP, 0, 0, 0, 0, + hwndOwner, 0, (HINSTANCE)GetWindowLongPtrW(hwndOwner, GWLP_HINSTANCE), + (LPVOID)hmenu ); + if( !menu->hWnd ) return FALSE; + return TRUE; +} + + +/*********************************************************************** * MENU_ShowPopup * * Display a popup menu. @@ -1829,7 +1864,6 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id, UINT flags, POINT pt; HMONITOR monitor; MONITORINFO info; - DWORD ex_style = 0; TRACE("owner=%p hmenu=%p id=0x%04x x=0x%04x y=0x%04x xa=0x%04x ya=0x%04x\n", hwndOwner, hmenu, id, x, y, xanchor, yanchor); @@ -1841,14 +1875,6 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id, UINT flags, menu->FocusedItem = NO_SELECTED_ITEM; } - /* store the owner for DrawItem */ - if (!IsWindow( hwndOwner )) - { - SetLastError( ERROR_INVALID_WINDOW_HANDLE ); - return FALSE; - } - menu->hwndOwner = hwndOwner; - menu->nScrollPos = 0; MENU_PopupMenuCalcSize( menu ); @@ -1865,10 +1891,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id, UINT flags, GetMonitorInfoW( monitor, &info ); if (flags & TPM_LAYOUTRTL) - { - ex_style = WS_EX_LAYOUTRTL; flags ^= TPM_RIGHTALIGN; - } if( flags & TPM_RIGHTALIGN ) x -= width; if( flags & TPM_CENTERALIGN ) x -= width / 2; @@ -1896,20 +1919,14 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id, UINT flags, } if( y < info.rcWork.top ) y = info.rcWork.top; - /* NOTE: In Windows, top menu popup is not owned. */ - menu->hWnd = CreateWindowExW( ex_style, (LPCWSTR)POPUPMENU_CLASS_ATOM, NULL, - WS_POPUP, x, y, width, height, - hwndOwner, 0, (HINSTANCE)GetWindowLongPtrW(hwndOwner, GWLP_HINSTANCE), - (LPVOID)hmenu ); - if( !menu->hWnd ) return FALSE; if (!top_popup) { top_popup = menu->hWnd; top_popup_hmenu = hmenu; } /* Display the window */ - SetWindowPos( menu->hWnd, HWND_TOPMOST, 0, 0, 0, 0, - SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE ); + SetWindowPos( menu->hWnd, HWND_TOPMOST, x, y, width, height, + SWP_SHOWWINDOW | SWP_NOACTIVATE ); UpdateWindow( menu->hWnd ); return TRUE; } @@ -2386,6 +2403,8 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, /* use default alignment for submenus */ wFlags &= ~(TPM_CENTERALIGN | TPM_RIGHTALIGN | TPM_VCENTERALIGN | TPM_BOTTOMALIGN); + MENU_InitPopup( hwndOwner, item->hSubMenu, wFlags ); + MENU_ShowPopup( hwndOwner, item->hSubMenu, menu->FocusedItem, wFlags, rect.left, rect.top, rect.right, rect.bottom ); if (selectFirst) @@ -3291,7 +3310,7 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags) * It also enables menus to be displayed in more than one window, * but there are some bugs left that need to be fixed in this case. */ - if ((menu = MENU_GetMenu( hMenu ))) menu->hWnd = hWnd; + if (!bPopup && (menu = MENU_GetMenu( hMenu ))) menu->hWnd = hWnd; if (!top_popup) top_popup_hmenu = hMenu; /* Send WM_ENTERMENULOOP and WM_INITMENU message only if TPM_NONOTIFY flag is not specified */ @@ -3442,16 +3461,29 @@ BOOL WINAPI TrackPopupMenuEx( HMENU hMenu, UINT wFlags, INT x, INT y, return FALSE; } - MENU_InitTracking(hWnd, hMenu, TRUE, wFlags); + if (MENU_InitPopup( hWnd, hMenu, wFlags )) + { + MENU_InitTracking(hWnd, hMenu, TRUE, wFlags); - /* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */ - if (!(wFlags & TPM_NONOTIFY)) - SendMessageW( hWnd, WM_INITMENUPOPUP, (WPARAM)hMenu, 0); + /* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */ + if (!(wFlags & TPM_NONOTIFY)) + SendMessageW( hWnd, WM_INITMENUPOPUP, (WPARAM)hMenu, 0); - if (MENU_ShowPopup( hWnd, hMenu, 0, wFlags, x, y, 0, 0 )) - ret = MENU_TrackMenu( hMenu, wFlags | TPM_POPUPMENU, 0, 0, hWnd, - lpTpm ? &lpTpm->rcExclude : NULL ); - MENU_ExitTracking(hWnd, TRUE); + if (MENU_ShowPopup( hWnd, hMenu, 0, wFlags, x, y, 0, 0 )) + ret = MENU_TrackMenu( hMenu, wFlags | TPM_POPUPMENU, 0, 0, hWnd, + lpTpm ? &lpTpm->rcExclude : NULL ); + MENU_ExitTracking(hWnd, TRUE); + + if (menu->hWnd) + { + DestroyWindow( menu->hWnd ); + menu->hWnd = 0; + + if (!(wFlags & TPM_NONOTIFY)) + SendMessageW( hWnd, WM_UNINITMENUPOPUP, (WPARAM)hMenu, + MAKELPARAM(0, IS_SYSTEM_MENU(menu)) ); + } + } return ret; }
1
0
0
0
Vincent Povirk : user32/tests: Add message tests for TrackPopupMenu.
by Alexandre Julliard
12 Mar '14
12 Mar '14
Module: wine Branch: master Commit: 7f8d1de1b7510a58a5793392ed5e6a5c950728fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f8d1de1b7510a58a5793392e…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Feb 26 13:04:42 2014 -0600 user32/tests: Add message tests for TrackPopupMenu. --- dlls/user32/tests/msg.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 20248dd..9c1320d 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1719,6 +1719,38 @@ static const struct message WmSHOWNATopInvisible[] = { { 0 } }; +static const struct message WmTrackPopupMenu[] = { + { HCBT_CREATEWND, hook }, + { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { WM_INITMENU, sent|lparam, 0, 0 }, + { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, + { 0x0093, sent|optional }, + { 0x0094, sent|optional }, + { 0x0094, sent|optional }, + { WM_ENTERIDLE, sent|wparam, 2 }, + { WM_CAPTURECHANGED, sent }, + { HCBT_DESTROYWND, hook }, + { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, + { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, + { 0 } +}; + +static const struct message WmTrackPopupMenuEmpty[] = { + { HCBT_CREATEWND, hook }, + { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { WM_INITMENU, sent|lparam, 0, 0 }, + { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, + { 0x0093, sent|optional }, + { 0x0094, sent|optional }, + { 0x0094, sent|optional }, + { WM_CAPTURECHANGED, sent }, + { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, + { HCBT_DESTROYWND, hook }, + { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, + { 0 } +}; + static BOOL after_end_dialog, test_def_id, paint_loop_done; static int sequence_cnt, sequence_size; static struct recvd_message* sequence; @@ -14260,6 +14292,80 @@ static void test_layered_window(void) DeleteObject( bmp ); } +static HMENU hpopupmenu; + +static LRESULT WINAPI cancel_popup_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + if (ignore_message( message )) return 0; + + switch (message) { + case WM_ENTERIDLE: + ok(GetCapture() == hwnd, "expected %p, got %p\n", hwnd, GetCapture()); + EndMenu(); + break; + case WM_INITMENU: + case WM_INITMENUPOPUP: + case WM_UNINITMENUPOPUP: + ok((HMENU)wParam == hpopupmenu, "expected %p, got %lx\n", hpopupmenu, wParam); + break; + } + + return MsgCheckProc (FALSE, hwnd, message, wParam, lParam); +} + +static void test_TrackPopupMenu(void) +{ + HWND hwnd; + BOOL ret; + + hwnd = CreateWindowExA(0, "TestWindowClass", NULL, 0, + 0, 0, 1, 1, 0, + NULL, NULL, 0); + ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + + SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)cancel_popup_proc); + + hpopupmenu = CreatePopupMenu(); + ok(hpopupmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + + AppendMenuA(hpopupmenu, MF_STRING, 100, "item 1"); + AppendMenuA(hpopupmenu, MF_STRING, 100, "item 2"); + + flush_events(); + flush_sequence(); + ret = TrackPopupMenu(hpopupmenu, 0, 100,100, 0, hwnd, NULL); + ok_sequence(WmTrackPopupMenu, "TrackPopupMenu", TRUE); + ok(ret == 1, "TrackPopupMenu failed with error %i\n", GetLastError()); + + DestroyMenu(hpopupmenu); + DestroyWindow(hwnd); +} + +static void test_TrackPopupMenuEmpty(void) +{ + HWND hwnd; + BOOL ret; + + hwnd = CreateWindowExA(0, "TestWindowClass", NULL, 0, + 0, 0, 1, 1, 0, + NULL, NULL, 0); + ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); + + SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)cancel_popup_proc); + + hpopupmenu = CreatePopupMenu(); + ok(hpopupmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); + + flush_events(); + flush_sequence(); + ret = TrackPopupMenu(hpopupmenu, 0, 100,100, 0, hwnd, NULL); + ok_sequence(WmTrackPopupMenuEmpty, "TrackPopupMenuEmpty", TRUE); + todo_wine ok(ret == 0, "TrackPopupMenu succeeded\n"); + + DestroyMenu(hpopupmenu); + DestroyWindow(hwnd); +} + static void init_funcs(void) { HMODULE hKernel32 = GetModuleHandleA("kernel32.dll"); @@ -14337,7 +14443,6 @@ START_TEST(msg) pUnhookWinEvent = 0; } hEvent_hook = 0; - test_SetFocus(); test_SetParent(); test_PostMessage(); @@ -14389,6 +14494,8 @@ START_TEST(msg) test_keyflags(); test_hotkey(); test_layered_window(); + test_TrackPopupMenu(); + test_TrackPopupMenuEmpty(); /* keep it the last test, under Windows it tends to break the tests * which rely on active/foreground windows being correct. */
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
53
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
Results per page:
10
25
50
100
200