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 2010
----- 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
852 discussions
Start a n
N
ew thread
Mariusz Pluciński : gameux: IGameStatistics:: GetMaxCategories implementation.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 6dfb5f6a33d6323394a75665cfd93082ed048ff0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6dfb5f6a33d6323394a75665c…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:39:57 2010 +0200 gameux: IGameStatistics::GetMaxCategories implementation. --- dlls/gameux/gamestatistics.c | 9 +++++++-- dlls/gameux/tests/gamestatistics.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index f0ee14c..c318eef 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -34,6 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(gameux); #define MAX_CATEGORY_LENGTH 60 #define MAX_NAME_LENGTH 30 #define MAX_VALUE_LENGTH 30 +#define MAX_CATEGORIES 10 /******************************************************************************* * IGameStatistics implementation */ @@ -147,8 +148,12 @@ static HRESULT WINAPI GameStatisticsImpl_GetMaxCategories( IGameStatistics *iface, WORD *pMax) { - FIXME("stub\n"); - return E_NOTIMPL; + TRACE("(%p, %p)\n", iface, pMax); + if(!pMax) + return E_INVALIDARG; + + *pMax = MAX_CATEGORIES; + return S_OK; } static HRESULT WINAPI GameStatisticsImpl_GetMaxStatsPerCategory( diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index d494d22..e485f9f 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -256,8 +256,8 @@ static void test_gamestatisticsmgr( void ) ok(uMaxValueLength==30, "getting maximum value length returned invalid value: %d\n", uMaxValueLength); hr = IGameStatistics_GetMaxCategories(gs, &wMaxCategories); - todo_wine ok(hr==S_OK, "getting maximum number of categories failed\n"); - todo_wine ok(wMaxCategories==10, "getting maximum number of categories returned invalid value: %d\n", wMaxCategories); + ok(hr==S_OK, "getting maximum number of categories failed\n"); + ok(wMaxCategories==10, "getting maximum number of categories returned invalid value: %d\n", wMaxCategories); hr = IGameStatistics_GetMaxStatsPerCategory(gs, &wMaxStatsPerCategory); todo_wine ok(hr==S_OK, "getting maximum number of statistics per category failed\n");
1
0
0
0
Mariusz Pluciński : gameux: IGameStatistics:: GetMaxValueLength implementation.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 448ac80fd4e917daf2151e38165a4fe0288358b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=448ac80fd4e917daf2151e381…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:39:49 2010 +0200 gameux: IGameStatistics::GetMaxValueLength implementation. --- dlls/gameux/gamestatistics.c | 9 +++++++-- dlls/gameux/tests/gamestatistics.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index 905baf2..f0ee14c 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -33,6 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(gameux); #define MAX_CATEGORY_LENGTH 60 #define MAX_NAME_LENGTH 30 +#define MAX_VALUE_LENGTH 30 /******************************************************************************* * IGameStatistics implementation */ @@ -134,8 +135,12 @@ static HRESULT WINAPI GameStatisticsImpl_GetMaxValueLength( IGameStatistics *iface, UINT *cch) { - FIXME("stub\n"); - return E_NOTIMPL; + TRACE("(%p, %p)\n", iface, cch); + if(!cch) + return E_INVALIDARG; + + *cch = MAX_VALUE_LENGTH; + return S_OK; } static HRESULT WINAPI GameStatisticsImpl_GetMaxCategories( diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index 3904bea..d494d22 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -252,8 +252,8 @@ static void test_gamestatisticsmgr( void ) ok(uMaxNameLength==30, "getting maximum name length returned invalid value: %d\n", uMaxNameLength); hr = IGameStatistics_GetMaxValueLength(gs, &uMaxValueLength); - todo_wine ok(hr==S_OK, "getting maximum value length failed\n"); - todo_wine ok(uMaxValueLength==30, "getting maximum value length returned invalid value: %d\n", uMaxValueLength); + ok(hr==S_OK, "getting maximum value length failed\n"); + ok(uMaxValueLength==30, "getting maximum value length returned invalid value: %d\n", uMaxValueLength); hr = IGameStatistics_GetMaxCategories(gs, &wMaxCategories); todo_wine ok(hr==S_OK, "getting maximum number of categories failed\n");
1
0
0
0
Mariusz Pluciński : gameux: IGameStatistics:: GetMaxNameLength implementation.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 301433b67034983313268022319d4ef4d36a0125 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=301433b670349833132680223…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:39:42 2010 +0200 gameux: IGameStatistics::GetMaxNameLength implementation. --- dlls/gameux/gamestatistics.c | 9 +++++++-- dlls/gameux/tests/gamestatistics.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index 063fbd5..905baf2 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(gameux); #define MAX_CATEGORY_LENGTH 60 +#define MAX_NAME_LENGTH 30 /******************************************************************************* * IGameStatistics implementation */ @@ -121,8 +122,12 @@ static HRESULT WINAPI GameStatisticsImpl_GetMaxNameLength( IGameStatistics *iface, UINT *cch) { - FIXME("stub\n"); - return E_NOTIMPL; + TRACE("(%p, %p)\n", iface, cch); + if(!cch) + return E_INVALIDARG; + + *cch = MAX_NAME_LENGTH; + return S_OK; } static HRESULT WINAPI GameStatisticsImpl_GetMaxValueLength( diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index 80e4e91..3904bea 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -248,8 +248,8 @@ static void test_gamestatisticsmgr( void ) ok(uMaxCategoryLength==60, "getting maximum length of category returned invalid value: %d\n", uMaxCategoryLength); hr = IGameStatistics_GetMaxNameLength(gs, &uMaxNameLength); - todo_wine ok(hr==S_OK, "getting maximum name length failed\n"); - todo_wine ok(uMaxNameLength==30, "getting maximum name length returned invalid value: %d\n", uMaxNameLength); + ok(hr==S_OK, "getting maximum name length failed\n"); + ok(uMaxNameLength==30, "getting maximum name length returned invalid value: %d\n", uMaxNameLength); hr = IGameStatistics_GetMaxValueLength(gs, &uMaxValueLength); todo_wine ok(hr==S_OK, "getting maximum value length failed\n");
1
0
0
0
Mariusz Pluciński : gameux: IGameStatistics:: GetMaxCategoryLength implementation.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 26552958f898d24356842c21f1734582769db65b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26552958f898d24356842c21f…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:39:30 2010 +0200 gameux: IGameStatistics::GetMaxCategoryLength implementation. --- dlls/gameux/gamestatistics.c | 9 +++++++-- dlls/gameux/tests/gamestatistics.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index 6978173..063fbd5 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(gameux); +#define MAX_CATEGORY_LENGTH 60 /******************************************************************************* * IGameStatistics implementation */ @@ -108,8 +109,12 @@ static HRESULT WINAPI GameStatisticsImpl_GetMaxCategoryLength( IGameStatistics *iface, UINT *cch) { - FIXME("stub\n"); - return E_NOTIMPL; + TRACE("(%p, %p)\n", iface, cch); + if(!cch) + return E_INVALIDARG; + + *cch = MAX_CATEGORY_LENGTH; + return S_OK; } static HRESULT WINAPI GameStatisticsImpl_GetMaxNameLength( diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index 7641157..80e4e91 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -244,8 +244,8 @@ static void test_gamestatisticsmgr( void ) { /* test of limit values returned from interface */ hr = IGameStatistics_GetMaxCategoryLength(gs, &uMaxCategoryLength); - todo_wine ok(hr==S_OK, "getting maximum length of category failed\n"); - todo_wine ok(uMaxCategoryLength==60, "getting maximum length of category returned invalid value: %d\n", uMaxCategoryLength); + ok(hr==S_OK, "getting maximum length of category failed\n"); + ok(uMaxCategoryLength==60, "getting maximum length of category returned invalid value: %d\n", uMaxCategoryLength); hr = IGameStatistics_GetMaxNameLength(gs, &uMaxNameLength); todo_wine ok(hr==S_OK, "getting maximum name length failed\n");
1
0
0
0
Mariusz Pluciński : gameux: Add stub of IGameStatistics interface implementation.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 0ef59050c6c855907fc1a2b2f04fbe5ef2816e14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ef59050c6c855907fc1a2b2f…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:37:54 2010 +0200 gameux: Add stub of IGameStatistics interface implementation. --- dlls/gameux/gamestatistics.c | 224 +++++++++++++++++++++++++++++++++++- dlls/gameux/tests/gamestatistics.c | 2 +- 2 files changed, 222 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index 0b872ac..6978173 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -31,10 +31,221 @@ WINE_DEFAULT_DEBUG_CHANNEL(gameux); -/* - * IGameStatisticsMgr implementation +/******************************************************************************* + * IGameStatistics implementation */ +typedef struct _GameStatisticsImpl +{ + const struct IGameStatisticsVtbl *lpVtbl; + LONG ref; +} GameStatisticsImpl; + +static inline GameStatisticsImpl *impl_from_IGameStatistics( IGameStatistics *iface ) +{ + return (GameStatisticsImpl *)((char*)iface - FIELD_OFFSET(GameStatisticsImpl, lpVtbl)); +} +static inline IGameStatistics *IGameStatistics_from_impl( GameStatisticsImpl* This ) +{ + return (struct IGameStatistics*)&This->lpVtbl; +} + + +static HRESULT WINAPI GameStatisticsImpl_QueryInterface( + IGameStatistics *iface, + REFIID riid, + void **ppvObject) +{ + GameStatisticsImpl *This = impl_from_IGameStatistics( iface ); + + TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject ); + + *ppvObject = NULL; + + if ( IsEqualGUID( riid, &IID_IUnknown ) || + IsEqualGUID( riid, &IID_IGameStatistics ) ) + { + *ppvObject = iface; + } + else + { + FIXME("interface %s not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; + } + + IGameStatistics_AddRef( iface ); + return S_OK; +} + +static ULONG WINAPI GameStatisticsImpl_AddRef(IGameStatistics *iface) +{ + GameStatisticsImpl *This = impl_from_IGameStatistics( iface ); + LONG ref; + + ref = InterlockedIncrement(&This->ref); + + TRACE("(%p): ref=%d\n", This, ref); + return ref; +} + +static ULONG WINAPI GameStatisticsImpl_Release(IGameStatistics *iface) +{ + GameStatisticsImpl *This = impl_from_IGameStatistics( iface ); + LONG ref; + + ref = InterlockedDecrement( &This->ref ); + TRACE("(%p): ref=%d\n", This, ref); + + if ( ref == 0 ) + { + TRACE("freeing IGameStatistics\n"); + HeapFree( GetProcessHeap(), 0, This ); + } + + return ref; +} + +static HRESULT WINAPI GameStatisticsImpl_GetMaxCategoryLength( + IGameStatistics *iface, + UINT *cch) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_GetMaxNameLength( + IGameStatistics *iface, + UINT *cch) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} +static HRESULT WINAPI GameStatisticsImpl_GetMaxValueLength( + IGameStatistics *iface, + UINT *cch) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_GetMaxCategories( + IGameStatistics *iface, + WORD *pMax) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_GetMaxStatsPerCategory( + IGameStatistics *iface, + WORD *pMax) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_SetCategoryTitle( + IGameStatistics *iface, + WORD categoryIndex, + LPCWSTR title) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_GetCategoryTitle( + IGameStatistics *iface, + WORD categoryIndex, + LPWSTR *pTitle) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_GetStatistic( + IGameStatistics *iface, + WORD categoryIndex, + WORD statIndex, + LPWSTR *pName, + LPWSTR *pValue) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_SetStatistic( + IGameStatistics *iface, + WORD categoryIndex, + WORD statIndex, + LPCWSTR name, + LPCWSTR value) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_Save( + IGameStatistics *iface, + BOOL trackChanges) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_SetLastPlayedCategory( + IGameStatistics *iface, + UINT categoryIndex) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI GameStatisticsImpl_GetLastPlayedCategory( + IGameStatistics *iface, + UINT *pCategoryIndex) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static const struct IGameStatisticsVtbl GameStatisticsImplVtbl = +{ + GameStatisticsImpl_QueryInterface, + GameStatisticsImpl_AddRef, + GameStatisticsImpl_Release, + GameStatisticsImpl_GetMaxCategoryLength, + GameStatisticsImpl_GetMaxNameLength, + GameStatisticsImpl_GetMaxValueLength, + GameStatisticsImpl_GetMaxCategories, + GameStatisticsImpl_GetMaxStatsPerCategory, + GameStatisticsImpl_SetCategoryTitle, + GameStatisticsImpl_GetCategoryTitle, + GameStatisticsImpl_GetStatistic, + GameStatisticsImpl_SetStatistic, + GameStatisticsImpl_Save, + GameStatisticsImpl_SetLastPlayedCategory, + GameStatisticsImpl_GetLastPlayedCategory +}; + + +HRESULT create_IGameStatistics(GameStatisticsImpl** ppStats) +{ + TRACE("(%p)\n", ppStats); + + *ppStats = HeapAlloc( GetProcessHeap(), 0, sizeof(**ppStats)); + if(!(*ppStats)) + return E_OUTOFMEMORY; + + (*ppStats)->lpVtbl = &GameStatisticsImplVtbl; + (*ppStats)->ref = 1; + + TRACE("returing coclass: %p\n", *ppStats); + return S_OK; +} + +/******************************************************************************* + * IGameStatisticsMgr implementation + */ typedef struct _GameStatisticsMgrImpl { const struct IGameStatisticsMgrVtbl *lpVtbl; @@ -117,6 +328,7 @@ static HRESULT STDMETHODCALLTYPE GameStatisticsMgrImpl_GetGameStatistics( WCHAR lpApplicationId[49]; DWORD dwLength = sizeof(lpApplicationId); GAME_INSTALL_SCOPE installScope; + GameStatisticsImpl *statisticsImpl; TRACE("(%p, %s, 0x%x, %p, %p)\n", iface, debugstr_w(GDFBinaryPath), openType, pOpenResult, ppiStats); @@ -150,7 +362,13 @@ static HRESULT STDMETHODCALLTYPE GameStatisticsMgrImpl_GetGameStatistics( if(SUCCEEDED(hr)) { TRACE("found app id: %s\n", debugstr_w(lpApplicationId)); - FIXME("creating instance of IGameStatistics not yet implemented\n"); + hr = create_IGameStatistics(&statisticsImpl); + } + + if(SUCCEEDED(hr)) + { + *ppiStats = IGameStatistics_from_impl(statisticsImpl); + FIXME("loading game statistics not yet implemented\n"); hr = E_NOTIMPL; } diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index 87b1066..7641157 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -239,7 +239,7 @@ static void test_gamestatisticsmgr( void ) /* now, allow to create */ hr = IGameStatisticsMgr_GetGameStatistics(gsm, sExeName, GAMESTATS_OPEN_OPENORCREATE, &dwOpenResult, &gs); todo_wine ok(SUCCEEDED(hr), "GetGameStatistics returned error: 0x%x\n", hr); - todo_wine ok(gs!=NULL, "GetGameStatistics did not return valid interface pointer\n"); + ok(gs!=NULL, "GetGameStatistics did not return valid interface pointer\n"); if(gs) { /* test of limit values returned from interface */
1
0
0
0
Mariusz Pluciński : gameux: Add partial implementation of IGameStatisticsMgr::GetGameStatistics.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 23efe79289a019fec68708425e66baf3baee84ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23efe79289a019fec68708425…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:37:42 2010 +0200 gameux: Add partial implementation of IGameStatisticsMgr::GetGameStatistics. --- dlls/gameux/gameexplorer.c | 39 +++---------------------------- dlls/gameux/gamestatistics.c | 52 ++++++++++++++++++++++++++++++++++++++++- dlls/gameux/gameux_private.h | 49 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 37 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index 1816ebd..744ae8a 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -69,29 +69,9 @@ void GAMEUX_uninitGameData(struct GAMEUX_GAME_DATA *GameData) /******************************************************************************* * GAMEUX_buildGameRegistryPath * - * Helper function, builds registry path to key, where game's data are stored - * - * Parameters: - * installScope [I] the scope which was used in AddGame/InstallGame call - * gameInstanceId [I] game instance GUID. If NULL, then only - * path to scope will be returned - * lpRegistryPath [O] pointer which will receive address to string - * containing expected registry path. Path - * is relative to HKLM registry key. It - * must be freed by calling HeapFree(GetProcessHeap(), 0, ...) - * - * Name of game's registry key always follows patterns below: - * When game is installed for current user only (installScope is GIS_CURRENT_USER): - * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ - * GameUX\[user's security ID]\[game instance ID] - * - * When game is installed for all users (installScope is GIS_ALL_USERS): - * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ - * GameUX\Games\[game instance ID] - * - * + * Internal helper function. Description available in gameux_private.h file */ -static HRESULT GAMEUX_buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, +HRESULT GAMEUX_buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, LPCGUID gameInstanceId, LPWSTR* lpRegistryPath) { @@ -697,20 +677,9 @@ static HRESULT GAMEUX_UpdateGame(LPGUID InstanceID) { /******************************************************************************* * GAMEUX_FindGameInstanceId * - * Helper funtion. Searches for instance identifier of given game in given - * installation scope. - * - * Parameters: - * sGDFBinaryPath [I] path to binary containing GDF - * installScope [I] game install scope to search in - * pInstanceId [O] instance identifier of given game - * - * Returns: - * S_OK id was returned properly - * S_FALSE id was not found in the registry - * E_OUTOFMEMORY problem while memory allocation + * Internal helper function. Description available in gameux_private.h file */ -static HRESULT GAMEUX_FindGameInstanceId( +HRESULT GAMEUX_FindGameInstanceId( LPCWSTR sGDFBinaryPath, GAME_INSTALL_SCOPE installScope, GUID* pInstanceId) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index 098754e..0b872ac 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -22,6 +22,7 @@ #include "config.h" #include "ole2.h" +#include "winreg.h" #include "gameux.h" #include "gameux_private.h" @@ -107,8 +108,55 @@ static HRESULT STDMETHODCALLTYPE GameStatisticsMgrImpl_GetGameStatistics( GAMESTATS_OPEN_RESULT *pOpenResult, IGameStatistics **ppiStats) { - FIXME("stub (%p, %s, 0x%x, %p, %p)\n", iface, debugstr_w(GDFBinaryPath), openType, pOpenResult, ppiStats); - return E_NOTIMPL; + static const WCHAR sApplicationId[] = + {'A','p','p','l','i','c','a','t','i','o','n','I','d',0}; + + HRESULT hr; + GUID instanceId; + LPWSTR lpRegistryPath = NULL; + WCHAR lpApplicationId[49]; + DWORD dwLength = sizeof(lpApplicationId); + GAME_INSTALL_SCOPE installScope; + + TRACE("(%p, %s, 0x%x, %p, %p)\n", iface, debugstr_w(GDFBinaryPath), openType, pOpenResult, ppiStats); + + if(!GDFBinaryPath) + return E_INVALIDARG; + + installScope = GIS_CURRENT_USER; + hr = GAMEUX_FindGameInstanceId(GDFBinaryPath, installScope, &instanceId); + + if(hr == S_FALSE) + { + installScope = GIS_ALL_USERS; + hr = GAMEUX_FindGameInstanceId(GDFBinaryPath, installScope, &instanceId); + } + + if(hr == S_FALSE) + /* game not registered, so statistics cannot be used */ + hr = E_FAIL; + + if(SUCCEEDED(hr)) + /* game is registered, let's read it's application id from registry */ + hr = GAMEUX_buildGameRegistryPath(installScope, &instanceId, &lpRegistryPath); + + if(SUCCEEDED(hr)) + { + hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, + lpRegistryPath, sApplicationId, RRF_RT_REG_SZ, + NULL, lpApplicationId, &dwLength)); + } + + if(SUCCEEDED(hr)) + { + TRACE("found app id: %s\n", debugstr_w(lpApplicationId)); + FIXME("creating instance of IGameStatistics not yet implemented\n"); + hr = E_NOTIMPL; + } + + HeapFree(GetProcessHeap(), 0, lpRegistryPath); + + return hr; } static HRESULT STDMETHODCALLTYPE GameStatisticsMgrImpl_RemoveGameStatistics( diff --git a/dlls/gameux/gameux_private.h b/dlls/gameux/gameux_private.h index 97826f0..86532e2 100644 --- a/dlls/gameux/gameux_private.h +++ b/dlls/gameux/gameux_private.h @@ -86,3 +86,52 @@ HRESULT WINAPI GAMEUX_RegisterGame(LPCWSTR sGDFBinaryPath, LPCWSTR sGameInstallDirectory, GAME_INSTALL_SCOPE installScope, GUID *pInstanceID); +/******************************************************************************* + * GAMEUX_FindGameInstanceId + * + * Helper funtion. Searches for instance identifier of given game in given + * installation scope. Implemented in gameexplorer.c + * + * Parameters: + * sGDFBinaryPath [I] path to binary containing GDF + * installScope [I] game install scope to search in + * pInstanceId [O] instance identifier of given game + * + * Returns: + * S_OK id was returned properly + * S_FALSE id was not found in the registry + * E_OUTOFMEMORY problem while memory allocation + */ +HRESULT GAMEUX_FindGameInstanceId( + LPCWSTR sGDFBinaryPath, + GAME_INSTALL_SCOPE installScope, + GUID* pInstanceId); +/******************************************************************************* + * GAMEUX_buildGameRegistryPath + * + * Helper function, builds registry path to key, where game's data are stored. + * Implemented in gameexplorer.c + * + * Parameters: + * installScope [I] the scope which was used in AddGame/InstallGame call + * gameInstanceId [I] game instance GUID. If NULL, then only + * path to scope will be returned + * lpRegistryPath [O] pointer which will receive address to string + * containing expected registry path. Path + * is relative to HKLM registry key. It + * must be freed by calling HeapFree(GetProcessHeap(), 0, ...) + * + * Name of game's registry key always follows patterns below: + * When game is installed for current user only (installScope is GIS_CURRENT_USER): + * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ + * GameUX\[user's security ID]\[game instance ID] + * + * When game is installed for all users (installScope is GIS_ALL_USERS): + * HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ + * GameUX\Games\[game instance ID] + * + * + */ +HRESULT GAMEUX_buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, + LPCGUID gameInstanceId, + LPWSTR* lpRegistryPath);
1
0
0
0
Mariusz Pluciński : gameux/tests: Add test of storing and reading game statistics.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 7c798a4a7d849baf44fa8ee5d2a6cc44762b58db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c798a4a7d849baf44fa8ee5d…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Thu Sep 23 15:36:57 2010 +0200 gameux/tests: Add test of storing and reading game statistics. --- dlls/gameux/tests/gamestatistics.c | 314 ++++++++++++++++++++++++++++++++++-- 1 files changed, 302 insertions(+), 12 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7c798a4a7d849baf44fa8…
1
0
0
0
Tijl Coosemans : configure: Detect resolver functionality on FreeBSD.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: e7ec164563d5657d3cfede16476496c31708bfea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7ec164563d5657d3cfede164…
Author: Tijl Coosemans <tijl(a)coosemans.org> Date: Thu Sep 23 18:20:31 2010 +0200 configure: Detect resolver functionality on FreeBSD. On FreeBSD this is part of libc. --- configure | 17 +++++++++++------ configure.ac | 15 ++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 788a57a..4937577 100755 --- a/configure +++ b/configure @@ -9977,13 +9977,13 @@ esac fi -RESOLVLIBS="" - if test "$ac_cv_header_resolv_h" = "yes" then ac_save_LIBS="$LIBS" - LIBS="$LIBS -lresolv" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + for lib in '' -lresolv + do + LIBS="$lib $ac_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> @@ -9992,7 +9992,7 @@ then int main () { -res_init(); +res_query("foo",ns_c_in,0,0,0); ; return 0; } @@ -10001,10 +10001,15 @@ if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_RESOLV 1" >>confdefs.h - RESOLVLIBS="-lresolv" + RESOLVLIBS="$lib" + fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + if test "${RESOLVLIBS+set}" = set; then + break + fi + done LIBS="$ac_save_LIBS" fi diff --git a/configure.ac b/configure.ac index f279293..341ba18 100644 --- a/configure.ac +++ b/configure.ac @@ -1266,17 +1266,22 @@ WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"], dnl **** Check for resolver library *** -AC_SUBST(RESOLVLIBS,"") if test "$ac_cv_header_resolv_h" = "yes" then ac_save_LIBS="$LIBS" - LIBS="$LIBS -lresolv" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H + for lib in '' -lresolv + do + LIBS="$lib $ac_save_LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif -#include <resolv.h>]],[[res_init();]])], +#include <resolv.h>]],[[res_query("foo",ns_c_in,0,0,0);]])], [AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header]) - RESOLVLIBS="-lresolv"]) + AC_SUBST(RESOLVLIBS,"$lib")]) + if test "${RESOLVLIBS+set}" = set; then + break + fi + done LIBS="$ac_save_LIBS" fi
1
0
0
0
Alexandre Julliard : winedbg: Make BreakOnFirstChance default to FALSE to avoid user confusion.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: 07898fe2fdf5bd97c830d9147fcb8f6e74ac8c56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07898fe2fdf5bd97c830d9147…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 24 11:34:11 2010 +0200 winedbg: Make BreakOnFirstChance default to FALSE to avoid user confusion. --- programs/winedbg/intvar.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winedbg/intvar.h b/programs/winedbg/intvar.h index 2771f23..4d1a80d 100644 --- a/programs/winedbg/intvar.h +++ b/programs/winedbg/intvar.h @@ -23,7 +23,7 @@ INTERNAL_VAR(BreakAllThreadsStartup, FALSE, NULL, dbg_itype_unsigned_int) INTERNAL_VAR(BreakOnCritSectTimeOut, FALSE, NULL, dbg_itype_unsigned_int) INTERNAL_VAR(BreakOnAttach, FALSE, NULL, dbg_itype_unsigned_int) -INTERNAL_VAR(BreakOnFirstChance, TRUE, NULL, dbg_itype_unsigned_int) +INTERNAL_VAR(BreakOnFirstChance, FALSE, NULL, dbg_itype_unsigned_int) INTERNAL_VAR(BreakOnDllLoad, FALSE, NULL, dbg_itype_unsigned_int) INTERNAL_VAR(CanDeferOnBPByAddr, FALSE, NULL, dbg_itype_unsigned_int)
1
0
0
0
Juan Lang : iphlpapi: Set adapter description in GetAdaptersAddresses.
by Alexandre Julliard
24 Sep '10
24 Sep '10
Module: wine Branch: master Commit: e192beeb0d1da9b22eea45dd6e5ee7e56eb97222 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e192beeb0d1da9b22eea45dd6…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Sep 20 09:47:25 2010 -0700 iphlpapi: Set adapter description in GetAdaptersAddresses. --- dlls/iphlpapi/iphlpapi_main.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 90101f7..d6e568f 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -768,7 +768,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD total_size = sizeof(IP_ADAPTER_ADDRESSES); total_size += IF_NAMESIZE; - total_size += IF_NAMESIZE * sizeof(WCHAR); + total_size += 2 * IF_NAMESIZE * sizeof(WCHAR); total_size += sizeof(IP_ADAPTER_UNICAST_ADDRESS) * num_v4addrs; total_size += sizeof(struct sockaddr_in) * num_v4addrs; total_size += (sizeof(IP_ADAPTER_GATEWAY_ADDRESS) + sizeof(SOCKADDR_IN)) * num_v4_gateways; @@ -796,6 +796,11 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD *dst = *src; *dst++ = 0; ptr = (char *)dst; + aa->Description = (WCHAR *)ptr; + for (src = name, dst = (WCHAR *)ptr; *src; src++, dst++) + *dst = *src; + *dst++ = 0; + ptr = (char *)dst; TRACE("%s: %d IPv4 addresses, %d IPv6 addresses:\n", name, num_v4addrs, num_v6addrs);
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
86
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200