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 2012
----- 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
3 participants
710 discussions
Start a n
N
ew thread
Henri Verbeet : d3d9: Don' t return a pointer to the implementation in IDirect3DSwapChain9Impl_QueryInterface ().
by Alexandre Julliard
30 Mar '12
30 Mar '12
Module: wine Branch: master Commit: b76f0aeee0476f14f7cd77941047776a6e4701ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b76f0aeee0476f14f7cd77941…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 30 01:08:37 2012 +0200 d3d9: Don't return a pointer to the implementation in IDirect3DSwapChain9Impl_QueryInterface(). --- dlls/d3d9/swapchain.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index b9bff96..7a13848 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -28,18 +28,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); /* IDirect3DSwapChain IUnknown parts follow: */ static HRESULT WINAPI IDirect3DSwapChain9Impl_QueryInterface(LPDIRECT3DSWAPCHAIN9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDirect3DSwapChain9)) { + if (IsEqualGUID(riid, &IID_IDirect3DSwapChain9) + || IsEqualGUID(riid, &IID_IUnknown)) + { IDirect3DSwapChain9_AddRef(iface); - *ppobj = This; + *ppobj = iface; return S_OK; } - WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + *ppobj = NULL; return E_NOINTERFACE; }
1
0
0
0
Henri Verbeet : ddraw: Querying IUnknown for a surface should return the IDirectDrawSurface interface .
by Alexandre Julliard
30 Mar '12
30 Mar '12
Module: wine Branch: master Commit: f7719a89adb83e91662cc6840f23afc23081c947 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7719a89adb83e91662cc6840…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 30 01:08:36 2012 +0200 ddraw: Querying IUnknown for a surface should return the IDirectDrawSurface interface. --- dlls/ddraw/surface.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 2178064..202eb4d 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -142,8 +142,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, if(!riid) return DDERR_INVALIDPARAMS; - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDirectDrawSurface7) ) + if (IsEqualGUID(riid, &IID_IDirectDrawSurface7)) { IDirectDrawSurface7_AddRef(iface); *obj = iface; @@ -175,7 +174,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, return S_OK; } - if (IsEqualGUID(riid, &IID_IDirectDrawSurface)) + if (IsEqualGUID(riid, &IID_IDirectDrawSurface) + || IsEqualGUID(riid, &IID_IUnknown)) { IDirectDrawSurface_AddRef(&This->IDirectDrawSurface_iface); *obj = &This->IDirectDrawSurface_iface;
1
0
0
0
Henri Verbeet : ddraw: Replace a ERR in ddraw_surface7_QueryInterface() with a WARN.
by Alexandre Julliard
30 Mar '12
30 Mar '12
Module: wine Branch: master Commit: a6230756121384ead6fca1308a42ae2fcd66ac99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6230756121384ead6fca1308…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 30 01:08:35 2012 +0200 ddraw: Replace a ERR in ddraw_surface7_QueryInterface() with a WARN. --- dlls/ddraw/surface.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index bf36825..2178064 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -232,7 +232,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, return S_OK; } - ERR("No interface\n"); + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + return E_NOINTERFACE; }
1
0
0
0
Henri Verbeet : ddraw: Get rid of a couple of redundant else-statements.
by Alexandre Julliard
30 Mar '12
30 Mar '12
Module: wine Branch: master Commit: f3d1d4790c139e72b5440602fcf5eb2c7d8cec53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3d1d4790c139e72b5440602f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 30 01:08:34 2012 +0200 ddraw: Get rid of a couple of redundant else-statements. --- dlls/ddraw/surface.c | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index cca17ab..bf36825 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -150,44 +150,50 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, TRACE("(%p) returning IDirectDrawSurface7 interface at %p\n", This, *obj); return S_OK; } - else if (IsEqualGUID(riid, &IID_IDirectDrawSurface4)) + + if (IsEqualGUID(riid, &IID_IDirectDrawSurface4)) { IDirectDrawSurface4_AddRef(&This->IDirectDrawSurface4_iface); *obj = &This->IDirectDrawSurface4_iface; TRACE("(%p) returning IDirectDrawSurface4 interface at %p\n", This, *obj); return S_OK; } - else if (IsEqualGUID(riid, &IID_IDirectDrawSurface3)) + + if (IsEqualGUID(riid, &IID_IDirectDrawSurface3)) { IDirectDrawSurface3_AddRef(&This->IDirectDrawSurface3_iface); *obj = &This->IDirectDrawSurface3_iface; TRACE("(%p) returning IDirectDrawSurface3 interface at %p\n", This, *obj); return S_OK; } - else if (IsEqualGUID(riid, &IID_IDirectDrawSurface2)) + + if (IsEqualGUID(riid, &IID_IDirectDrawSurface2)) { IDirectDrawSurface2_AddRef(&This->IDirectDrawSurface2_iface); *obj = &This->IDirectDrawSurface2_iface; TRACE("(%p) returning IDirectDrawSurface2 interface at %p\n", This, *obj); return S_OK; } - else if (IsEqualGUID(riid, &IID_IDirectDrawSurface)) + + if (IsEqualGUID(riid, &IID_IDirectDrawSurface)) { IDirectDrawSurface_AddRef(&This->IDirectDrawSurface_iface); *obj = &This->IDirectDrawSurface_iface; TRACE("(%p) returning IDirectDrawSurface interface at %p\n", This, *obj); return S_OK; } - else if( IsEqualGUID(riid, &IID_IDirectDrawGammaControl) ) + + if (IsEqualGUID(riid, &IID_IDirectDrawGammaControl)) { IDirectDrawGammaControl_AddRef(&This->IDirectDrawGammaControl_iface); *obj = &This->IDirectDrawGammaControl_iface; TRACE("(%p) returning IDirectDrawGammaControl interface at %p\n", This, *obj); return S_OK; } - else if( IsEqualGUID(riid, &IID_D3DDEVICE_WineD3D) || - IsEqualGUID(riid, &IID_IDirect3DHALDevice)|| - IsEqualGUID(riid, &IID_IDirect3DRGBDevice) ) + + if (IsEqualGUID(riid, &IID_D3DDEVICE_WineD3D) + || IsEqualGUID(riid, &IID_IDirect3DHALDevice) + || IsEqualGUID(riid, &IID_IDirect3DRGBDevice)) { IDirect3DDevice7 *d3d; IDirect3DDeviceImpl *device_impl; @@ -208,8 +214,9 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, WARN("Unable to create a IDirect3DDevice instance, returning E_NOINTERFACE\n"); return E_NOINTERFACE; } - else if (IsEqualGUID( &IID_IDirect3DTexture, riid ) || - IsEqualGUID( &IID_IDirect3DTexture2, riid )) + + if (IsEqualGUID( &IID_IDirect3DTexture2, riid) + || IsEqualGUID(&IID_IDirect3DTexture, riid)) { if (IsEqualGUID( &IID_IDirect3DTexture, riid )) {
1
0
0
0
Christian Costa : dmusic: Add some tests for enumerating and creating ports .
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: 997be9c4656f07771a7ddb46b4820aaf30a3e1ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=997be9c4656f07771a7ddb46b…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Thu Mar 29 09:09:31 2012 +0200 dmusic: Add some tests for enumerating and creating ports. --- configure | 1 + configure.ac | 1 + dlls/dmusic/tests/Makefile.in | 7 +++ dlls/dmusic/tests/dmusic.c | 104 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 0 deletions(-) diff --git a/configure b/configure index aab6618..2cb3166 100755 --- a/configure +++ b/configure @@ -15021,6 +15021,7 @@ wine_fn_config_dll dmscript enable_dmscript wine_fn_config_dll dmstyle enable_dmstyle wine_fn_config_dll dmsynth enable_dmsynth wine_fn_config_dll dmusic enable_dmusic +wine_fn_config_test dlls/dmusic/tests dmusic_test wine_fn_config_dll dmusic32 enable_dmusic32 implib wine_fn_config_dll dnsapi enable_dnsapi implib wine_fn_config_test dlls/dnsapi/tests dnsapi_test diff --git a/configure.ac b/configure.ac index 805825d..f55b2ff 100644 --- a/configure.ac +++ b/configure.ac @@ -2528,6 +2528,7 @@ WINE_CONFIG_DLL(dmscript) WINE_CONFIG_DLL(dmstyle) WINE_CONFIG_DLL(dmsynth) WINE_CONFIG_DLL(dmusic) +WINE_CONFIG_TEST(dlls/dmusic/tests) WINE_CONFIG_DLL(dmusic32,,[implib]) WINE_CONFIG_DLL(dnsapi,,[implib]) WINE_CONFIG_TEST(dlls/dnsapi/tests) diff --git a/dlls/dmusic/tests/Makefile.in b/dlls/dmusic/tests/Makefile.in new file mode 100644 index 0000000..3a762f2 --- /dev/null +++ b/dlls/dmusic/tests/Makefile.in @@ -0,0 +1,7 @@ +TESTDLL = dmusic.dll +IMPORTS = oleaut32 ole32 uuid + +C_SRCS = \ + dmusic.c + +@MAKE_TEST_RULES@ diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c new file mode 100644 index 0000000..043dd4d --- /dev/null +++ b/dlls/dmusic/tests/dmusic.c @@ -0,0 +1,104 @@ +/* + * Unit tests for dmusic functions + * + * Copyright (C) 2012 Christian Costa + * + * 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 <stdio.h> + +#include "wine/test.h" +#include "uuids.h" +#include "ole2.h" +#include "initguid.h" +#include "dmusici.h" + +static inline char* debugstr_guid(CONST GUID *id) +{ + static char string[39]; + sprintf(string, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); + return string; +} + +static void test_dmusic(void) +{ + IDirectMusic *dmusic = NULL; + HRESULT hr; + ULONG index = 0; + DMUS_PORTCAPS port_caps; + DMUS_PORTPARAMS port_params; + IDirectMusicPort *port = NULL; + + hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic); + if (hr != S_OK) + { + skip("Cannot create DirectMusic object (%x)\n", hr); + return; + } + + port_params.dwSize = sizeof(port_params); + port_params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS; + port_params.dwChannelGroups = 1; + port_params.dwAudioChannels = 2; + + /* No port can be created before SetDirectSound is called */ + hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL); + todo_wine ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %x\n", hr); + + hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL); + ok(hr == S_OK, "IDirectMusic_SetDirectSound returned: %x\n", hr); + + /* Test creation of default port with GUID_NULL */ + hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL); + todo_wine ok(hr == S_OK, "IDirectMusic_CreatePort returned: %x\n", hr); + + port_caps.dwSize = sizeof(port_caps); + while (IDirectMusic_EnumPort(dmusic, index, &port_caps) == S_OK) + { + ok(port_caps.dwSize == sizeof(port_caps), "DMUS_PORTCAPS dwSize member is wrong (%u)\n", port_caps.dwSize); + trace("Port %u:\n", index); + trace(" dwFlags = %x\n", port_caps.dwFlags); + trace(" guidPort = %s\n", debugstr_guid(&port_caps.guidPort)); + trace(" dwClass = %u\n", port_caps.dwClass); + trace(" dwType = %u\n", port_caps.dwType); + trace(" dwMemorySize = %u\n", port_caps.dwMemorySize); + trace(" dwMaxChannelGroups = %u\n", port_caps.dwMaxChannelGroups); + trace(" dwMaxVoices = %u\n", port_caps.dwMaxVoices); + trace(" dwMaxAudioChannels = %u\n", port_caps.dwMaxAudioChannels); + trace(" dwEffectFlags = %x\n", port_caps.dwEffectFlags); + trace(" wszDescription = %s\n", wine_dbgstr_w(port_caps.wszDescription)); + index++; + } + + if (port) + IDirectMusicPort_Release(port); + if (dmusic) + IDirectMusic_Release(dmusic); +} + +START_TEST(dmusic) +{ + CoInitializeEx(NULL, COINIT_MULTITHREADED); + + test_dmusic(); + + CoUninitialize(); +}
1
0
0
0
Christian Costa : d3drm: Partial implementation of IDirec3DRM: Load method + tests.
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: 756f29641b2762aa4b6fe8a718452223642e87cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=756f29641b2762aa4b6fe8a71…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Mon Mar 26 22:35:21 2012 +0200 d3drm: Partial implementation of IDirec3DRM:Load method + tests. --- dlls/d3drm/d3drm.c | 233 ++++++++++++++++++++++++++++++++++++++++++++- dlls/d3drm/tests/d3drm.c | 56 +++++++++++ 2 files changed, 283 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=756f29641b2762aa4b6fe…
1
0
0
0
Christian Costa : d3drm: Move mesh loading code into a separate function so it can be shared.
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: db0ad52b497887eb8860b1cb0895dd306d353a9d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db0ad52b497887eb8860b1cb0…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Mon Mar 26 22:35:12 2012 +0200 d3drm: Move mesh loading code into a separate function so it can be shared. --- dlls/d3drm/d3drm_private.h | 11 ++ dlls/d3drm/meshbuilder.c | 222 ++++++++++++++++++++++++-------------------- 2 files changed, 131 insertions(+), 102 deletions(-) diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h index 452f22f..8a74ee0 100644 --- a/dlls/d3drm/d3drm_private.h +++ b/dlls/d3drm/d3drm_private.h @@ -22,6 +22,7 @@ #define __D3DRM_PRIVATE_INCLUDED__ #include "d3drm.h" +#include "dxfile.h" HRESULT Direct3DRM_create(IUnknown** ppObj) DECLSPEC_HIDDEN; HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN; @@ -29,4 +30,14 @@ HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN; HRESULT Direct3DRMMeshBuilder_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN; HRESULT Direct3DRMViewport_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN; +HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData) DECLSPEC_HIDDEN; + +typedef struct { + WORD major; + WORD minor; + DWORD flags; +} Header; + +extern char templates[]; + #endif /* __D3DRM_PRIVATE_INCLUDED__ */ diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index b386cbf..398ce2c 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -52,13 +52,7 @@ typedef struct { Coords2d* pCoords2d; } IDirect3DRMMeshBuilderImpl; -typedef struct { - WORD major; - WORD minor; - DWORD flags; -} Header; - -static char templates[] = { +char templates[] = { "xof 0302txt 0064" "template Header" "{" @@ -1025,22 +1019,13 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_GetClassName(IDirect3DRMMeshBu return E_NOTIMPL; } -/*** IDirect3DRMMeshBuilder3 methods ***/ -static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* iface, - LPVOID filename, LPVOID name, - D3DRMLOADOPTIONS loadflags, - D3DRMLOADTEXTURE3CALLBACK cb, LPVOID arg) +HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData) { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface); - DXFILELOADOPTIONS load_options; - LPDIRECTXFILE pDXFile = NULL; - LPDIRECTXFILEENUMOBJECT pEnumObject = NULL; - LPDIRECTXFILEDATA pData = NULL; LPDIRECTXFILEOBJECT pObject = NULL; LPDIRECTXFILEDATA pData2 = NULL; const GUID* pGuid; DWORD size; - Header* pHeader; LPBYTE ptr; HRESULT hr; HRESULT ret = D3DRMERR_BADOBJECT; @@ -1053,90 +1038,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* DWORD faces_data_size = 0; DWORD i; - TRACE("(%p)->(%p,%p,%x,%p,%p)\n", This, filename, name, loadflags, cb, arg); - - /* First free allocated buffers of previous mesh data */ - HeapFree(GetProcessHeap(), 0, This->pVertices); - This->pVertices = NULL; - HeapFree(GetProcessHeap(), 0, This->pNormals); - This->pNormals = NULL; - HeapFree(GetProcessHeap(), 0, This->pFaceData); - This->pFaceData = NULL; - HeapFree(GetProcessHeap(), 0, This->pCoords2d); - This->pCoords2d = NULL; - - if (loadflags == D3DRMLOAD_FROMMEMORY) - { - load_options = DXFILELOAD_FROMMEMORY; - } - else - { - FIXME("Load options %d not supported yet\n", loadflags); - return E_NOTIMPL; - } - - hr = DirectXFileCreate(&pDXFile); - if (hr != DXFILE_OK) - goto end; - - hr = IDirectXFile_RegisterTemplates(pDXFile, templates, strlen(templates)); - if (hr != DXFILE_OK) - goto end; - - hr = IDirectXFile_CreateEnumObject(pDXFile, filename, load_options, &pEnumObject); - if (hr != DXFILE_OK) - goto end; - - hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); - if (hr != DXFILE_OK) - goto end; - - hr = IDirectXFileData_GetType(pData, &pGuid); - if (hr != DXFILE_OK) - goto end; - - TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); - - if (!IsEqualGUID(pGuid, &TID_DXFILEHeader)) - { - ret = D3DRMERR_BADFILE; - goto end; - } - - hr = IDirectXFileData_GetData(pData, NULL, &size, (void**)&pHeader); - if ((hr != DXFILE_OK) || (size != sizeof(Header))) - goto end; - - TRACE("Version is %d %d %d\n", pHeader->major, pHeader->minor, pHeader->flags); - - /* Version must be 1.0.x */ - if ((pHeader->major != 1) || (pHeader->minor != 0)) - { - ret = D3DRMERR_BADFILE; - goto end; - } - - IDirectXFileData_Release(pData); - pData = NULL; - - hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); - if (hr != DXFILE_OK) - { - ret = D3DRMERR_NOTFOUND; - goto end; - } - - hr = IDirectXFileData_GetType(pData, &pGuid); - if (hr != DXFILE_OK) - goto end; - - TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); - - if (!IsEqualGUID(pGuid, &TID_D3DRMMesh)) - { - ret = D3DRMERR_NOTFOUND; - goto end; - } + TRACE("(%p)->(%p)\n", This, pData); hr = IDirectXFileData_GetData(pData, NULL, &size, (void**)&ptr); if (hr != DXFILE_OK) @@ -1170,7 +1072,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* if (hr != DXFILE_OK) goto end; - hr = IDirectXFileObject_QueryInterface(pObject, &IID_IDirectXFileData, (void**)&pData2); + hr = IDirectXFileObject_QueryInterface(pObject, &IID_IDirectXFileData, (void**)&pData2); IDirectXFileObject_Release(pObject); if (hr != DXFILE_OK) goto end; @@ -1285,11 +1187,127 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* } } + TRACE("Mesh data loaded successfully\n"); + ret = D3DRM_OK; end: + HeapFree(GetProcessHeap(), 0, faces_normal_idx_data); HeapFree(GetProcessHeap(), 0, faces_vertex_idx_data); + + return ret; +} + +/*** IDirect3DRMMeshBuilder3 methods ***/ +static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* iface, + LPVOID filename, LPVOID name, + D3DRMLOADOPTIONS loadflags, + D3DRMLOADTEXTURE3CALLBACK cb, LPVOID arg) +{ + IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface); + DXFILELOADOPTIONS load_options; + LPDIRECTXFILE pDXFile = NULL; + LPDIRECTXFILEENUMOBJECT pEnumObject = NULL; + LPDIRECTXFILEDATA pData = NULL; + LPDIRECTXFILEDATA pData2 = NULL; + const GUID* pGuid; + DWORD size; + Header* pHeader; + HRESULT hr; + HRESULT ret = D3DRMERR_BADOBJECT; + + TRACE("(%p)->(%p,%p,%x,%p,%p)\n", This, filename, name, loadflags, cb, arg); + + /* First free allocated buffers of previous mesh data */ + HeapFree(GetProcessHeap(), 0, This->pVertices); + This->pVertices = NULL; + HeapFree(GetProcessHeap(), 0, This->pNormals); + This->pNormals = NULL; + HeapFree(GetProcessHeap(), 0, This->pFaceData); + This->pFaceData = NULL; + HeapFree(GetProcessHeap(), 0, This->pCoords2d); + This->pCoords2d = NULL; + + if (loadflags == D3DRMLOAD_FROMMEMORY) + { + load_options = DXFILELOAD_FROMMEMORY; + } + else + { + FIXME("Load options %d not supported yet\n", loadflags); + return E_NOTIMPL; + } + + hr = DirectXFileCreate(&pDXFile); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFile_RegisterTemplates(pDXFile, templates, strlen(templates)); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFile_CreateEnumObject(pDXFile, filename, load_options, &pEnumObject); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFileData_GetType(pData, &pGuid); + if (hr != DXFILE_OK) + goto end; + + TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); + + if (!IsEqualGUID(pGuid, &TID_DXFILEHeader)) + { + ret = D3DRMERR_BADFILE; + goto end; + } + + hr = IDirectXFileData_GetData(pData, NULL, &size, (void**)&pHeader); + if ((hr != DXFILE_OK) || (size != sizeof(Header))) + goto end; + + TRACE("Version is %d %d %d\n", pHeader->major, pHeader->minor, pHeader->flags); + + /* Version must be 1.0.x */ + if ((pHeader->major != 1) || (pHeader->minor != 0)) + { + ret = D3DRMERR_BADFILE; + goto end; + } + + IDirectXFileData_Release(pData); + pData = NULL; + + hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); + if (hr != DXFILE_OK) + { + ret = D3DRMERR_NOTFOUND; + goto end; + } + + hr = IDirectXFileData_GetType(pData, &pGuid); + if (hr != DXFILE_OK) + goto end; + + TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); + + if (!IsEqualGUID(pGuid, &TID_D3DRMMesh)) + { + ret = D3DRMERR_NOTFOUND; + goto end; + } + + hr = load_mesh_data(iface, pData); + if (hr == S_OK) + ret = D3DRM_OK; + +end: + if (pData2) IDirectXFileData_Release(pData2); if (pData)
1
0
0
0
Christian Costa : qcap: Enable registration of all non yet implemented filters.
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: e3c781376e501f6cb99af6dc6171b1da65e70010 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3c781376e501f6cb99af6dc6…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Mon Mar 26 22:04:15 2012 +0200 qcap: Enable registration of all non yet implemented filters. --- dlls/qcap/qcap_main.c | 55 ++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 28 deletions(-) diff --git a/dlls/qcap/qcap_main.c b/dlls/qcap/qcap_main.c index d89aafe..6f175cf 100644 --- a/dlls/qcap/qcap_main.c +++ b/dlls/qcap/qcap_main.c @@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); static LONG objects_ref = 0; -static const WCHAR wAudioCaptFilter[] = +static const WCHAR wAudioCaptureFilter[] = {'A','u','d','i','o',' ','C','a','p','t','u','r','e',' ','F','i','l','t','e','r',0}; static const WCHAR wAVICompressor[] = {'A','V','I',' ','C','o','m','p','r','e','s','s','o','r',0}; @@ -76,48 +76,47 @@ static const WCHAR wAudioInMixerProp[] = 'p','e','r','t','y',' ','P','a','g','e',0}; FactoryTemplate const g_Templates[] = { -/* { - wAudioCaptureFilter, - &CLSID_AudioCaptureFilter, - QCAP_createAudioCaptureFilter, + wAudioCaptureFilter, + &CLSID_AudioRecord, + NULL, /* FIXME: Implement QCAP_createAudioCaptureFilter */ NULL },{ - wAVICompressor, - &CLSID_AVICompressor, - QCAP_createAVICompressor, + wAVICompressor, + &CLSID_AVICo, + NULL, /* FIXME: Implement QCAP_createAVICompressor */ NULL - },*/{ + },{ wVFWCaptFilter, &CLSID_VfwCapture, QCAP_createVFWCaptureFilter, NULL - },/*{ + },{ wVFWCaptFilterProp, - &CLSID_VFWCaptureFilterPropertyPage, - QCAP_createVFWCaptureFilterPropertyPage, + &CLSID_CaptureProperties, + NULL, /* FIXME: Implement QCAP_createVFWCaptureFilterPropertyPage */ NULL },{ wAVIMux, - &CLSID_AVImux, - QCAP_createAVImux, + &CLSID_AviDest, + NULL, /* FIXME: Implement QCAP_createAVImux */ NULL },{ wAVIMuxPropPage, - &CLSID_AVImuxPropertyPage, - QCAP_createAVImuxPropertyPage, + &CLSID_AviMuxProptyPage, + NULL, /* FIXME: Implement QCAP_createAVImuxPropertyPage */ NULL },{ wAVIMuxPropPage1, - &CLSID_AVImuxPropertyPage1, - QCAP_createAVImuxPropertyPage1, + &CLSID_AviMuxProptyPage1, + NULL, /* FIXME: Implement QCAP_createAVImuxPropertyPage1 */ NULL },{ wFileWriter, &CLSID_FileWriter, - QCAP_createFileWriter, + NULL, /* FIXME: Implement QCAP_createFileWriter */ NULL - },*/{ + },{ wCaptGraphBuilder, &CLSID_CaptureGraphBuilder, QCAP_createCaptureGraphBuilder2, @@ -127,22 +126,22 @@ FactoryTemplate const g_Templates[] = { &CLSID_CaptureGraphBuilder2, QCAP_createCaptureGraphBuilder2, NULL - }/*,{ + },{ wInfPinTeeFilter, - &CLSID_InfinitePinTeeFilter, - QCAP_createInfinitePinTeeFilter, + &CLSID_InfTee, + NULL, /* FIXME: Implement QCAP_createInfinitePinTeeFilter */ NULL },{ wSmartTeeFilter, - &CLSID_SmartTeeFilter, - QCAP_createSmartTeeFilter, + &CLSID_SmartTee, + NULL, /* FIXME: Implement QCAP_createSmartTeeFilter */ NULL },{ wAudioInMixerProp, - &CLSID_AudioInputMixerPropertyPage, - QCAP_createAudioInputMixerPropertyPage, + &CLSID_AudioInputMixerProperties, + NULL, /* FIXME: Implement QCAP_createAudioInputMixerPropertyPage */ NULL - }*/ + } }; int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
1
0
0
0
Józef Kucia : wpp: Fix a few memory leaks in the wpp_parse() function.
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: 2c8a3c31b732b048a05fcb3e9756b76f9a57e973 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c8a3c31b732b048a05fcb3e9…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Sun Mar 25 15:53:31 2012 +0200 wpp: Fix a few memory leaks in the wpp_parse() function. --- libs/wpp/wpp.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/libs/wpp/wpp.c b/libs/wpp/wpp.c index 0c9c808..66eb026 100644 --- a/libs/wpp/wpp.c +++ b/libs/wpp/wpp.c @@ -49,6 +49,16 @@ static void add_cmdline_defines(void) } } +static void del_cmdline_defines(void) +{ + struct define *def; + + for (def = cmdline_defines; def; def = def->next) + { + if (def->value) pp_del_define( def->name ); + } +} + static void add_special_defines(void) { time_t now = time(NULL); @@ -70,6 +80,14 @@ static void add_special_defines(void) ppp->type = def_special; } +static void del_special_defines(void) +{ + pp_del_define( "__DATE__" ); + pp_del_define( "__TIME__" ); + pp_del_define( "__FILE__" ); + pp_del_define( "__LINE__" ); +} + /* add a define to the preprocessor list */ int wpp_add_define( const char *name, const char *value ) @@ -182,6 +200,8 @@ int wpp_parse( const char *input, FILE *output ) else if (!(pp_status.file = wpp_callbacks->open(input, 1))) { ppy_error("Could not open %s\n", input); + del_special_defines(); + del_cmdline_defines(); pp_pop_define_state(); return 2; } @@ -198,6 +218,8 @@ int wpp_parse( const char *input, FILE *output ) if (input) wpp_callbacks->close(pp_status.file); /* Clean if_stack, it could remain dirty on errors */ while (pp_get_if_depth()) pp_pop_if(); + del_special_defines(); + del_cmdline_defines(); pp_pop_define_state(); return ret; }
1
0
0
0
Dmitry Timoshkov : advapi32: Add event security access tests.
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: d574e7948e87d11de591b8d25012365622da02a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d574e7948e87d11de591b8d25…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Mar 16 18:31:43 2012 +0800 advapi32: Add event security access tests. --- dlls/advapi32/tests/security.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 0b653ff..9db84a4 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -4104,6 +4104,27 @@ static void test_mutex_security(HANDLE token) CloseHandle (mutex); } +static void test_event_security(HANDLE token) +{ + HANDLE event; + GENERIC_MAPPING mapping = { STANDARD_RIGHTS_READ, STANDARD_RIGHTS_WRITE, + STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE, + STANDARD_RIGHTS_ALL | EVENT_ALL_ACCESS }; + + SetLastError(0xdeadbeef); + event = OpenEvent(0, FALSE, "WineTestEvent"); + ok(!event, "event should not exist\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + + SetLastError(0xdeadbeef); + event = CreateEvent(NULL, FALSE, FALSE, "WineTestEvent"); + ok(event != 0, "CreateEvent error %d\n", GetLastError()); + + test_default_handle_security(token, event, &mapping); + + CloseHandle(event); +} + static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) { DWORD ret, needed; @@ -4175,6 +4196,7 @@ static void test_kernel_objects_security(void) ok(token_type == TokenImpersonation, "expected TokenImpersonation, got %d\n", token_type); test_mutex_security(token); + test_event_security(token); /* FIXME: test other kernel object types */ CloseHandle(process_token);
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
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