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 2013
----- 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
645 discussions
Start a n
N
ew thread
Michael Stefaniuc : dplayx: Merge the extra struct into IDirectPlaySPImpl.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: 11756086b4fef4d6769a315b93fd7cf0a1ee0333 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11756086b4fef4d6769a315b9…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:59:07 2013 +0200 dplayx: Merge the extra struct into IDirectPlaySPImpl. --- dlls/dplayx/dplaysp.c | 122 ++++++++++++------------------------------------- 1 files changed, 30 insertions(+), 92 deletions(-) diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index e8fea40..780834c 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -33,34 +33,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); -/* Prototypes */ -static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ); -static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ); - -/* Predefine the interface */ -typedef struct IDirectPlaySPImpl IDirectPlaySPImpl; - -typedef struct tagDirectPlaySPData -{ - LPVOID lpSpRemoteData; - DWORD dwSpRemoteDataSize; /* Size of data pointed to by lpSpRemoteData */ - - LPVOID lpSpLocalData; - DWORD dwSpLocalDataSize; /* Size of data pointed to by lpSpLocalData */ - - IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */ - -} DirectPlaySPData; - -#define DPSP_IMPL_FIELDS \ - DirectPlaySPData* sp; - -struct IDirectPlaySPImpl +typedef struct IDirectPlaySPImpl { const IDirectPlaySPVtbl *lpVtbl; LONG ref; - DPSP_IMPL_FIELDS -}; + void *remote_data; + DWORD remote_data_size; + void *local_data; + DWORD local_data_size; + IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */ +} IDirectPlaySPImpl; /* Forward declaration of virtual tables */ static const IDirectPlaySPVtbl directPlaySPVT; @@ -92,6 +74,7 @@ HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) { IDirectPlaySPImpl *This = *ppvObj; This->lpVtbl = &directPlaySPVT; + This->dplay = dp; } else { @@ -102,49 +85,8 @@ HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) return E_NOINTERFACE; } - /* Initialize it */ - if( DPSP_CreateDirectPlaySP( *ppvObj, dp ) ) - { - IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj ); - return S_OK; - } - - /* Initialize failed, destroy it */ - DPSP_DestroyDirectPlaySP( *ppvObj ); - - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return DPERR_NOMEMORY; -} - -static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ) -{ - IDirectPlaySPImpl *This = lpSP; - - This->sp = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->sp) ) ); - - if ( This->sp == NULL ) - { - return FALSE; - } - - This->sp->dplay = dp; - - return TRUE; -} - -static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ) -{ - IDirectPlaySPImpl *This = lpSP; - - HeapFree( GetProcessHeap(), 0, This->sp->lpSpRemoteData ); - HeapFree( GetProcessHeap(), 0, This->sp->lpSpLocalData ); - - /* FIXME: Need to delete player queue */ - - HeapFree( GetProcessHeap(), 0, This->sp ); - return TRUE; + IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj ); + return S_OK; } static inline IDirectPlaySPImpl *impl_from_IDirectPlaySP( IDirectPlaySP *iface ) @@ -188,7 +130,8 @@ static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) if( !ref ) { - DPSP_DestroyDirectPlaySP( This ); + HeapFree( GetProcessHeap(), 0, This->remote_data ); + HeapFree( GetProcessHeap(), 0, This->local_data ); HeapFree( GetProcessHeap(), 0, This ); } @@ -269,7 +212,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData( IDirectPlaySP *iface, D TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, idPlayer, lplpData, lpdwDataSize, dwFlags ); - hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerData ); + hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerData ); if( FAILED(hr) ) { @@ -336,9 +279,8 @@ static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage( IDirectPlaySP *iface, voi data.dwMessageSize = 0; /* Pass this message to the dplay interface to handle */ - hr = DP_HandleMessage( This->sp->dplay, lpMessageBody, dwMessageBodySize, - lpMessageHeader, wCommandId, wVersion, - &data.lpMessage, &data.dwMessageSize ); + hr = DP_HandleMessage( This->dplay, lpMessageBody, dwMessageBodySize, lpMessageHeader, + wCommandId, wVersion, &data.lpMessage, &data.dwMessageSize ); if( FAILED(hr) ) { @@ -352,7 +294,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage( IDirectPlaySP *iface, voi data.idNameServer = 0; data.lpISP = iface; - hr = (This->sp->dplay->dp2->spData.lpCB->Reply)( &data ); + hr = This->dplay->dp2->spData.lpCB->Reply( &data ); if( FAILED(hr) ) { @@ -616,7 +558,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, D TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, idPlayer, lpData, dwDataSize, dwFlags ); - hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerEntry ); + hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerEntry ); if( FAILED(hr) ) { /* Player must not exist */ @@ -637,7 +579,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, D lpPlayerEntry->dwPlayerRemoteDataSize = dwDataSize; } - hr = DP_SetSPPlayerData( This->sp->dplay, idPlayer, lpPlayerEntry ); + hr = DP_SetSPPlayerData( This->dplay, idPlayer, lpPlayerEntry ); return hr; } @@ -684,23 +626,19 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void ** /* Yes, we're supposed to return a pointer to the memory we have stored! */ if( dwFlags == DPSET_REMOTE ) { - *lpdwDataSize = This->sp->dwSpRemoteDataSize; - *lplpData = This->sp->lpSpRemoteData; + *lpdwDataSize = This->remote_data_size; + *lplpData = This->remote_data; - if( This->sp->lpSpRemoteData == NULL ) - { + if( !This->remote_data ) hr = DPERR_GENERIC; - } } else if( dwFlags == DPSET_LOCAL ) { - *lpdwDataSize = This->sp->dwSpLocalDataSize; - *lplpData = This->sp->lpSpLocalData; + *lpdwDataSize = This->local_data_size; + *lplpData = This->local_data; - if( This->sp->lpSpLocalData == NULL ) - { + if( !This->local_data ) hr = DPERR_GENERIC; - } } return hr; @@ -737,15 +675,15 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *l /* If we have data already allocated, free it and replace it */ if( dwFlags == DPSET_REMOTE ) { - HeapFree( GetProcessHeap(), 0, This->sp->lpSpRemoteData ); - This->sp->dwSpRemoteDataSize = dwDataSize; - This->sp->lpSpRemoteData = lpSpData; + HeapFree( GetProcessHeap(), 0, This->remote_data ); + This->remote_data_size = dwDataSize; + This->remote_data = lpSpData; } else if ( dwFlags == DPSET_LOCAL ) { - HeapFree( GetProcessHeap(), 0, This->sp->lpSpLocalData ); - This->sp->lpSpLocalData = lpSpData; - This->sp->dwSpLocalDataSize = dwDataSize; + HeapFree( GetProcessHeap(), 0, This->local_data ); + This->local_data = lpSpData; + This->local_data_size = dwDataSize; } return DP_OK;
1
0
0
0
Michael Stefaniuc : dplayx: Remove the unused lock from IDirectPlaySPImpl.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: 95fcb495032b9e3ab68a5b2ec1cd1f1ab2f953cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95fcb495032b9e3ab68a5b2ec…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:57:16 2013 +0200 dplayx: Remove the unused lock from IDirectPlaySPImpl. --- dlls/dplayx/dplaysp.c | 43 +------------------------------------------ 1 files changed, 1 insertions(+), 42 deletions(-) diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index 03169e3..e8fea40 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -34,19 +34,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* Prototypes */ -static BOOL DPSP_CreateIUnknown( LPVOID lpSP ); -static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ); static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ); static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ); /* Predefine the interface */ typedef struct IDirectPlaySPImpl IDirectPlaySPImpl; -typedef struct tagDirectPlaySPIUnknownData -{ - CRITICAL_SECTION DPSP_lock; -} DirectPlaySPIUnknownData; - typedef struct tagDirectPlaySPData { LPVOID lpSpRemoteData; @@ -60,7 +53,6 @@ typedef struct tagDirectPlaySPData } DirectPlaySPData; #define DPSP_IMPL_FIELDS \ - DirectPlaySPIUnknownData* unk; \ DirectPlaySPData* sp; struct IDirectPlaySPImpl @@ -111,9 +103,7 @@ HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) } /* Initialize it */ - if( DPSP_CreateIUnknown( *ppvObj ) && - DPSP_CreateDirectPlaySP( *ppvObj, dp ) - ) + if( DPSP_CreateDirectPlaySP( *ppvObj, dp ) ) { IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj ); return S_OK; @@ -121,7 +111,6 @@ HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) /* Initialize failed, destroy it */ DPSP_DestroyDirectPlaySP( *ppvObj ); - DPSP_DestroyIUnknown( *ppvObj ); HeapFree( GetProcessHeap(), 0, *ppvObj ); *ppvObj = NULL; @@ -129,35 +118,6 @@ HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) return DPERR_NOMEMORY; } -static BOOL DPSP_CreateIUnknown( LPVOID lpSP ) -{ - IDirectPlaySPImpl *This = lpSP; - - This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) ); - - if ( This->unk == NULL ) - { - return FALSE; - } - - InitializeCriticalSection( &This->unk->DPSP_lock ); - This->unk->DPSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlaySPImpl*->DirectPlaySPIUnknownData*->DPSP_lock"); - - return TRUE; -} - -static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ) -{ - IDirectPlaySPImpl *This = lpSP; - - This->unk->DPSP_lock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &This->unk->DPSP_lock ); - HeapFree( GetProcessHeap(), 0, This->unk ); - - return TRUE; -} - - static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ) { IDirectPlaySPImpl *This = lpSP; @@ -229,7 +189,6 @@ static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) if( !ref ) { DPSP_DestroyDirectPlaySP( This ); - DPSP_DestroyIUnknown( This ); HeapFree( GetProcessHeap(), 0, This ); }
1
0
0
0
Michael Stefaniuc : dplayx: Remove commented out TRACEs that mimic +tid functionality.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: 07e59757971841e5bf8848bfca94cbe0c535ae62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07e59757971841e5bf8848bfc…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:54:27 2013 +0200 dplayx: Remove commented out TRACEs that mimic +tid functionality. --- dlls/dplayx/dplaysp.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index 52fe09f..03169e3 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -655,9 +655,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, D LPDP_SPPLAYERDATA lpPlayerEntry; LPVOID lpPlayerData; -/* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ - TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", - This, idPlayer, lpData, dwDataSize, dwFlags ); + TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, idPlayer, lpData, dwDataSize, dwFlags ); hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerEntry ); if( FAILED(hr) ) @@ -703,9 +701,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void ** IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr = DP_OK; -/* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ - TRACE( "(%p)->(%p,%p,0x%08x)\n", - This, lplpData, lpdwDataSize, dwFlags ); + TRACE( "(%p)->(%p,%p,0x%08x)\n", This, lplpData, lpdwDataSize, dwFlags ); #if 0 /* This is what the documentation says... */ @@ -757,9 +753,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *l IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); LPVOID lpSpData; -/* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ - TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", - This, lpData, dwDataSize, dwFlags ); + TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", This, lpData, dwDataSize, dwFlags ); #if 0 /* This is what the documentation says... */
1
0
0
0
Michael Stefaniuc : dplayx: Simplify ref-counting for IDirectPlaySP.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: 744f94be4abcbf65627d45b57746a80c8e6799e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=744f94be4abcbf65627d45b57…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:50:58 2013 +0200 dplayx: Simplify ref-counting for IDirectPlaySP. --- dlls/dplayx/dplaysp.c | 71 +++++++++++++----------------------------------- 1 files changed, 19 insertions(+), 52 deletions(-) diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index aac2811..52fe09f 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -44,7 +44,6 @@ typedef struct IDirectPlaySPImpl IDirectPlaySPImpl; typedef struct tagDirectPlaySPIUnknownData { - LONG ulObjRef; CRITICAL_SECTION DPSP_lock; } DirectPlaySPIUnknownData; @@ -61,13 +60,13 @@ typedef struct tagDirectPlaySPData } DirectPlaySPData; #define DPSP_IMPL_FIELDS \ - LONG ulInterfaceRef; \ DirectPlaySPIUnknownData* unk; \ DirectPlaySPData* sp; struct IDirectPlaySPImpl { const IDirectPlaySPVtbl *lpVtbl; + LONG ref; DPSP_IMPL_FIELDS }; @@ -194,79 +193,47 @@ static inline IDirectPlaySPImpl *impl_from_IDirectPlaySP( IDirectPlaySP *iface ) } static HRESULT WINAPI IDirectPlaySPImpl_QueryInterface( IDirectPlaySP *iface, REFIID riid, - void **ppvObj ) + void **ppv ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid( riid ), ppv ); - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - CopyMemory( *ppvObj, This, sizeof( *This ) ); - (*(IDirectPlaySPImpl**)ppvObj)->ulInterfaceRef = 0; - - if( IsEqualGUID( &IID_IDirectPlaySP, riid ) ) - { - IDirectPlaySPImpl *This = *ppvObj; - This->lpVtbl = &directPlaySPVT; - } - else + if ( IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IDirectPlaySP, riid ) ) { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; + *ppv = iface; + IDirectPlaySP_AddRef( iface ); + return S_OK; } - IDirectPlaySP_AddRef( (LPDIRECTPLAYSP)*ppvObj ); - - return S_OK; + FIXME( "Unsupported interface %s\n", debugstr_guid( riid ) ); + *ppv = NULL; + return E_NOINTERFACE; } static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface ) { IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); - ULONG ulInterfaceRefCount, ulObjRefCount; - - ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); + ULONG ref = InterlockedIncrement( &This->ref ); - TRACE( "ref count incremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); + TRACE( "(%p) ref=%d\n", This, ref ); - return ulObjRefCount; + return ref; } static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) { IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); - ULONG ulInterfaceRefCount, ulObjRefCount; - - ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); + ULONG ref = InterlockedDecrement( &This->ref ); - TRACE( "ref count decremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - /* Deallocate if this is the last reference to the object */ - if( ulObjRefCount == 0 ) - { - DPSP_DestroyDirectPlaySP( This ); - DPSP_DestroyIUnknown( This ); - } + TRACE( "(%p) ref=%d\n", This, ref ); - if( ulInterfaceRefCount == 0 ) + if( !ref ) { + DPSP_DestroyDirectPlaySP( This ); + DPSP_DestroyIUnknown( This ); HeapFree( GetProcessHeap(), 0, This ); } - return ulInterfaceRefCount; + return ref; } static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry( IDirectPlaySP *iface, LPCWSTR lpSection,
1
0
0
0
Michael Stefaniuc : dplayx: Introduce impl_from_IDirectPlaySP().
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: 008cc60821f029ce7212a103ca34f9c2df761415 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=008cc60821f029ce7212a103c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:49:25 2013 +0200 dplayx: Introduce impl_from_IDirectPlaySP(). --- dlls/dplayx/dplaysp.c | 143 ++++++++++++++++--------------------------------- 1 files changed, 46 insertions(+), 97 deletions(-) diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index 3a2f36d..aac2811 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -188,6 +188,11 @@ static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ) return TRUE; } +static inline IDirectPlaySPImpl *impl_from_IDirectPlaySP( IDirectPlaySP *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlaySPImpl, lpVtbl ); +} + static HRESULT WINAPI IDirectPlaySPImpl_QueryInterface( IDirectPlaySP *iface, REFIID riid, void **ppvObj ) { @@ -226,8 +231,8 @@ static HRESULT WINAPI IDirectPlaySPImpl_QueryInterface( IDirectPlaySP *iface, RE static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); @@ -240,8 +245,8 @@ static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface ) static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); @@ -264,16 +269,10 @@ static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) return ulInterfaceRefCount; } -static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry -( LPDIRECTPLAYSP iface, - LPCWSTR lpSection, - LPCWSTR lpKey, - LPCVOID lpData, - DWORD dwDataSize, - DWORD dwMaxEntries -) +static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry( IDirectPlaySP *iface, LPCWSTR lpSection, + LPCWSTR lpKey, const void *lpData, DWORD dwDataSize, DWORD dwMaxEntries ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); /* Should be able to call the comctl32 undocumented MRU routines. I suspect that the interface works appropriately */ @@ -283,17 +282,11 @@ static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress -( LPDIRECTPLAYSP iface, - REFGUID guidSP, - REFGUID guidDataType, - LPCVOID lpData, - DWORD dwDataSize, - LPVOID lpAddress, - LPDWORD lpdwAddressSize -) +static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress( IDirectPlaySP *iface, REFGUID guidSP, + REFGUID guidDataType, const void *lpData, DWORD dwDataSize, void *lpAddress, + DWORD *lpdwAddressSize ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(%s,%s,%p,0x%08x,%p,%p): stub\n", This, debugstr_guid(guidSP), debugstr_guid(guidDataType), @@ -302,15 +295,11 @@ static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress -( LPDIRECTPLAYSP iface, - LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, - LPCVOID lpAddress, - DWORD dwAddressSize, - LPVOID lpContext -) +static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress( IDirectPlaySP *iface, + LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, const void *lpAddress, DWORD dwAddressSize, + void *lpContext ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); TRACE( "(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext ); @@ -320,15 +309,10 @@ static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries -( LPDIRECTPLAYSP iface, - LPCWSTR lpSection, - LPCWSTR lpKey, - LPENUMMRUCALLBACK lpEnumMRUCallback, - LPVOID lpContext -) +static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries( IDirectPlaySP *iface, LPCWSTR lpSection, + LPCWSTR lpKey, LPENUMMRUCALLBACK lpEnumMRUCallback, void *lpContext ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); /* Should be able to call the comctl32 undocumented MRU routines. I suspect that the interface works appropriately */ @@ -338,13 +322,10 @@ static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags -( LPDIRECTPLAYSP iface, - DPID idPlayer, - LPDWORD lpdwPlayerFlags -) +static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags( IDirectPlaySP *iface, DPID idPlayer, + DWORD *lpdwPlayerFlags ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(0x%08x,%p): stub\n", This, idPlayer, lpdwPlayerFlags ); @@ -352,17 +333,12 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData -( LPDIRECTPLAYSP iface, - DPID idPlayer, - LPVOID* lplpData, - LPDWORD lpdwDataSize, - DWORD dwFlags -) +static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData( IDirectPlaySP *iface, DPID idPlayer, + void **lplpData, DWORD *lpdwDataSize, DWORD dwFlags ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr; LPDP_SPPLAYERDATA lpPlayerData; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, idPlayer, lplpData, lpdwDataSize, dwFlags ); @@ -395,21 +371,16 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData return hr; } -static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage -( LPDIRECTPLAYSP iface, - LPVOID lpMessageBody, - DWORD dwMessageBodySize, - LPVOID lpMessageHeader -) +static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage( IDirectPlaySP *iface, void *lpMessageBody, + DWORD dwMessageBodySize, void *lpMessageHeader ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); LPDPMSG_SENDENVELOPE lpMsg = lpMessageBody; HRESULT hr = DPERR_GENERIC; WORD wCommandId; WORD wVersion; DPSP_REPLYDATA data; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - FIXME( "(%p)->(%p,0x%08x,%p): mostly stub\n", This, lpMessageBody, dwMessageBodySize, lpMessageHeader ); @@ -709,20 +680,14 @@ static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage #endif } -static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData -( LPDIRECTPLAYSP iface, - DPID idPlayer, - LPVOID lpData, - DWORD dwDataSize, - DWORD dwFlags -) +static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, DPID idPlayer, + void *lpData, DWORD dwDataSize, DWORD dwFlags ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr; LPDP_SPPLAYERDATA lpPlayerEntry; LPVOID lpPlayerData; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - /* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, idPlayer, lpData, dwDataSize, dwFlags ); @@ -753,15 +718,11 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData return hr; } -static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress -( LPDIRECTPLAYSP iface, - LPCDPCOMPOUNDADDRESSELEMENT lpElements, - DWORD dwElementCount, - LPVOID lpAddress, - LPDWORD lpdwAddressSize -) +static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress( IDirectPlaySP *iface, + const DPCOMPOUNDADDRESSELEMENT *lpElements, DWORD dwElementCount, void *lpAddress, + DWORD *lpdwAddressSize ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(%p,0x%08x,%p,%p): stub\n", This, lpElements, dwElementCount, lpAddress, lpdwAddressSize ); @@ -769,15 +730,11 @@ static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress return DP_OK; } -static HRESULT WINAPI IDirectPlaySPImpl_GetSPData -( LPDIRECTPLAYSP iface, - LPVOID* lplpData, - LPDWORD lpdwDataSize, - DWORD dwFlags -) +static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void **lplpData, + DWORD *lpdwDataSize, DWORD dwFlags ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); HRESULT hr = DP_OK; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; /* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ TRACE( "(%p)->(%p,%p,0x%08x)\n", @@ -827,17 +784,12 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPData return hr; } -static HRESULT WINAPI IDirectPlaySPImpl_SetSPData -( LPDIRECTPLAYSP iface, - LPVOID lpData, - DWORD dwDataSize, - DWORD dwFlags -) +static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *lpData, + DWORD dwDataSize, DWORD dwFlags ) { + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); LPVOID lpSpData; - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; - /* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", This, lpData, dwDataSize, dwFlags ); @@ -879,13 +831,10 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPData return DP_OK; } -static VOID WINAPI IDirectPlaySPImpl_SendComplete -( LPDIRECTPLAYSP iface, - LPVOID unknownA, - DWORD unknownB -) +static void WINAPI IDirectPlaySPImpl_SendComplete( IDirectPlaySP *iface, void *unknownA, + DWORD unknownB ) { - IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; + IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface ); FIXME( "(%p)->(%p,0x%08x): stub\n", This, unknownA, unknownB );
1
0
0
0
Michael Stefaniuc : dplayx: Use consistent naming for the IDirectPlaySP methods.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: 12245de80168e7f08c33df49ff34237ce8e7730f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=12245de80168e7f08c33df49f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:47:25 2013 +0200 dplayx: Use consistent naming for the IDirectPlaySP methods. --- dlls/dplayx/dplaysp.c | 22 +++++++--------------- 1 files changed, 7 insertions(+), 15 deletions(-) diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c index 899348e..3a2f36d 100644 --- a/dlls/dplayx/dplaysp.c +++ b/dlls/dplayx/dplaysp.c @@ -188,12 +188,8 @@ static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ) return TRUE; } -/* Interface implementation */ - -static HRESULT WINAPI DPSP_QueryInterface -( LPDIRECTPLAYSP iface, - REFIID riid, - LPVOID* ppvObj ) +static HRESULT WINAPI IDirectPlaySPImpl_QueryInterface( IDirectPlaySP *iface, REFIID riid, + void **ppvObj ) { IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); @@ -228,8 +224,7 @@ static HRESULT WINAPI DPSP_QueryInterface return S_OK; } -static ULONG WINAPI DPSP_AddRef -( LPDIRECTPLAYSP iface ) +static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface ) { ULONG ulInterfaceRefCount, ulObjRefCount; IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; @@ -243,8 +238,7 @@ static ULONG WINAPI DPSP_AddRef return ulObjRefCount; } -static ULONG WINAPI DPSP_Release -( LPDIRECTPLAYSP iface ) +static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface ) { ULONG ulInterfaceRefCount, ulObjRefCount; IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; @@ -899,11 +893,9 @@ static VOID WINAPI IDirectPlaySPImpl_SendComplete static const IDirectPlaySPVtbl directPlaySPVT = { - - DPSP_QueryInterface, - DPSP_AddRef, - DPSP_Release, - + IDirectPlaySPImpl_QueryInterface, + IDirectPlaySPImpl_AddRef, + IDirectPlaySPImpl_Release, IDirectPlaySPImpl_AddMRUEntry, IDirectPlaySPImpl_CreateAddress, IDirectPlaySPImpl_EnumAddress,
1
0
0
0
Michael Stefaniuc : dplayx: Fix the initial refcount of the IDPLobbySPImpl object.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: b9a2efdf2419c359cf3f60e31615deb87b5849cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9a2efdf2419c359cf3f60e31…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Sep 4 23:45:28 2013 +0200 dplayx: Fix the initial refcount of the IDPLobbySPImpl object. --- dlls/dplayx/lobbysp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 72198da..3528f94 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -240,7 +240,7 @@ HRESULT dplobbysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) return DPERR_OUTOFMEMORY; obj->IDPLobbySP_iface.lpVtbl = &dpLobbySPVT; - obj->ref = 0; + obj->ref = 1; obj->dplay = dp; hr = IDPLobbySP_QueryInterface( &obj->IDPLobbySP_iface, riid, ppv );
1
0
0
0
Piotr Caban : oleaut32: Add ICreateTypeInfo2::SetVarName implementation.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: a2ea406eee40c74251d98d6f6a81b8fc349e02b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2ea406eee40c74251d98d6f6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Sep 4 22:28:50 2013 +0200 oleaut32: Add ICreateTypeInfo2::SetVarName implementation. --- dlls/oleaut32/tests/typelib.c | 16 ++++++++++++++-- dlls/oleaut32/typelib.c | 13 +++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 8b91212..b873ac2 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -4287,13 +4287,14 @@ static void test_SetVarDocString(void) static OLECHAR nameW[] = {'n','a','m','e',0}; static OLECHAR doc1W[] = {'d','o','c','1',0}; static OLECHAR doc2W[] = {'d','o','c','2',0}; + static OLECHAR var_nameW[] = {'v','a','r','n','a','m','e',0}; CHAR filenameA[MAX_PATH]; WCHAR filenameW[MAX_PATH]; ICreateTypeLib2 *ctl; ICreateTypeInfo *cti; ITypeLib *tl; ITypeInfo *ti; - BSTR docstr; + BSTR namestr, docstr; VARDESC desc, *pdesc; HRESULT hr; VARIANT v; @@ -4324,6 +4325,15 @@ static void test_SetVarDocString(void) hr = ICreateTypeInfo_AddVarDesc(cti, 0, &desc); ok(hr == S_OK, "got %08x\n", hr); + hr = ICreateTypeInfo_SetVarName(cti, 0, NULL); + ok(hr == E_INVALIDARG, "got %08x\n", hr); + + hr = ICreateTypeInfo_SetVarName(cti, 1, var_nameW); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + + hr = ICreateTypeInfo_SetVarName(cti, 0, var_nameW); + ok(hr == S_OK, "got %08x\n", hr); + hr = ICreateTypeInfo_SetVarDocString(cti, 0, NULL); ok(hr == E_INVALIDARG, "got %08x\n", hr); @@ -4359,10 +4369,12 @@ static void test_SetVarDocString(void) ok(V_VT(U(pdesc)->lpvarValue) == VT_INT, "got wrong value type: %u\n", V_VT(U(pdesc)->lpvarValue)); ok(V_INT(U(pdesc)->lpvarValue) == 1, "got wrong value: 0x%x\n", V_INT(U(pdesc)->lpvarValue)); - hr = ITypeInfo_GetDocumentation(ti, pdesc->memid, NULL, &docstr, NULL, NULL); + hr = ITypeInfo_GetDocumentation(ti, pdesc->memid, &namestr, &docstr, NULL, NULL); ok(hr == S_OK, "got %08x\n", hr); + ok(memcmp(namestr, var_nameW, sizeof(var_nameW)) == 0, "got wrong name: %s\n", wine_dbgstr_w(namestr)); ok(memcmp(docstr, doc2W, sizeof(doc2W)) == 0, "got wrong docstring: %s\n", wine_dbgstr_w(docstr)); + SysFreeString(namestr); SysFreeString(docstr); ITypeInfo_ReleaseVarDesc(ti, pdesc); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 4f55755..a27f5f4 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -10688,8 +10688,17 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName(ICreateTypeInfo2 *iface, UINT index, LPOLESTR name) { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); - FIXME("%p %u %s - stub\n", This, index, wine_dbgstr_w(name)); - return E_NOTIMPL; + + TRACE("%p %u %s\n", This, index, wine_dbgstr_w(name)); + + if(!name) + return E_INVALIDARG; + + if(index >= This->cVars) + return TYPE_E_ELEMENTNOTFOUND; + + This->vardescs[index].Name = TLB_append_str(&This->pTypeLib->name_list, name); + return S_OK; } static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeDescAlias(ICreateTypeInfo2 *iface,
1
0
0
0
Alexandre Julliard : ntdll: Add a configure check for the tcdrain function.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: wine Branch: master Commit: f21961cc1427faad65abf36df217a8c888cae7fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f21961cc1427faad65abf36df…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 5 00:10:19 2013 +0200 ntdll: Add a configure check for the tcdrain function. Also remove the tcgetattr check that is no longer used. --- configure | 2 +- configure.ac | 2 +- dlls/ntdll/file.c | 9 +-------- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/serial.c | 26 ++++++++++++++++++++++++++ include/config.h.in | 4 ++-- 6 files changed, 32 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 56c983f..6b2c2c8 100755 --- a/configure +++ b/configure @@ -13436,7 +13436,7 @@ for ac_func in \ strtoll \ strtoull \ symlink \ - tcgetattr \ + tcdrain \ thr_kill2 \ timegm \ usleep \ diff --git a/configure.ac b/configure.ac index 3a0007c..7c1cb1c 100644 --- a/configure.ac +++ b/configure.ac @@ -2063,7 +2063,7 @@ AC_CHECK_FUNCS(\ strtoll \ strtoull \ symlink \ - tcgetattr \ + tcdrain \ thr_kill2 \ timegm \ usleep \ diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 83e286e..9420df5 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -2777,14 +2777,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock if (!ret && type == FD_TYPE_SERIAL) { - while (tcdrain( fd ) == -1) - { - if (errno != EINTR) - { - ret = FILE_GetNtStatus(); - break; - } - } + ret = COMM_FlushBuffersFile( fd ); } else { diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 3d9264d..a13c55b 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -142,6 +142,7 @@ extern NTSTATUS TAPE_DeviceIoControl(HANDLE hDevice, ULONG IoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize) DECLSPEC_HIDDEN; +extern NTSTATUS COMM_FlushBuffersFile( int fd ) DECLSPEC_HIDDEN; /* file I/O */ struct stat; diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index b4f9aa9..07ba633 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -1342,3 +1342,29 @@ NTSTATUS COMM_DeviceIoControl(HANDLE hDevice, lpOutBuffer, nOutBufferSize); return status; } + +NTSTATUS COMM_FlushBuffersFile( int fd ) +{ +#ifdef HAVE_TCDRAIN + while (tcdrain( fd ) == -1) + { + if (errno != EINTR) return FILE_GetNtStatus(); + } + return STATUS_SUCCESS; +#elif defined(TIOCDRAIN) + while (ioctl( fd, TIOCDRAIN ) == -1) + { + if (errno != EINTR) return FILE_GetNtStatus(); + } + return STATUS_SUCCESS; +#elif defined(TCSBRK) + while (ioctl( fd, TCSBRK, 1 ) == -1) + { + if (errno != EINTR) return FILE_GetNtStatus(); + } + return STATUS_SUCCESS; +#else + ERR( "not supported\n" ); + return STATUS_NOT_IMPLEMENTED; +#endif +} diff --git a/include/config.h.in b/include/config.h.in index aac10a5..44b34ce 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1068,8 +1068,8 @@ /* Define to 1 if you have the <sys/wait.h> header file. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the `tcgetattr' function. */ -#undef HAVE_TCGETATTR +/* Define to 1 if you have the `tcdrain' function. */ +#undef HAVE_TCDRAIN /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H
1
0
0
0
Alexandre Julliard : winetest: Expire old queue files after a month.
by Alexandre Julliard
05 Sep '13
05 Sep '13
Module: tools Branch: master Commit: d104f7a7905d5bfeccab790ad38377bc17fdadad URL:
http://source.winehq.org/git/tools.git/?a=commit;h=d104f7a7905d5bfeccab790a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 5 19:33:39 2013 +0200 winetest: Expire old queue files after a month. --- winetest/winetest.cron | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/winetest/winetest.cron b/winetest/winetest.cron index 0ff60be..eaacf4f 100755 --- a/winetest/winetest.cron +++ b/winetest/winetest.cron @@ -23,5 +23,10 @@ if [ ! -f $lock ]; then # remove old test builds (cd builds && find . -mtime +$expire -name winetest\*.exe -print0 | xargs -0 rm -f) + + # remove old queue files + find queue -maxdepth 1 -mtime +30 -name err\* -print0 | xargs -0 rm -rf + find queue -maxdepth 1 -mtime +30 -name CGI\* -print0 | xargs -0 rm -f + rm $lock fi
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
65
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
Results per page:
10
25
50
100
200