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
July 2007
----- 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
957 discussions
Start a n
N
ew thread
Hans Leidekker : pdh: Implement and test PdhGetRawCounterValue.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 754ac8c478cd7c149a4bf88a5c1a9212bc9811f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=754ac8c478cd7c149a4bf88a5…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jul 9 20:55:25 2007 +0200 pdh: Implement and test PdhGetRawCounterValue. --- dlls/pdh/pdh.spec | 2 +- dlls/pdh/pdh_main.c | 24 ++++++++++++++++++++++++ dlls/pdh/tests/pdh.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletions(-) diff --git a/dlls/pdh/pdh.spec b/dlls/pdh/pdh.spec index 6dfc73d..7ed4207 100644 --- a/dlls/pdh/pdh.spec +++ b/dlls/pdh/pdh.spec @@ -64,7 +64,7 @@ @ stub PdhGetLogSetGUID @ stub PdhGetRawCounterArrayA @ stub PdhGetRawCounterArrayW -@ stub PdhGetRawCounterValue +@ stdcall PdhGetRawCounterValue(ptr ptr ptr) @ stub PdhIsRealTimeQuery @ stub PdhListLogFileHeaderA @ stub PdhListLogFileHeaderW diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index f89493e..a04d1eb 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -327,6 +327,30 @@ PDH_STATUS WINAPI PdhGetFormattedCounterValue( PDH_HCOUNTER handle, DWORD format } /*********************************************************************** + * PdhGetRawCounterValue (PDH.@) + */ +PDH_STATUS WINAPI PdhGetRawCounterValue( PDH_HCOUNTER handle, LPDWORD type, + PPDH_RAW_COUNTER value ) +{ + struct counter *counter = handle; + + TRACE("%p %p %p\n", handle, type, value); + + if (!value) return PDH_INVALID_ARGUMENT; + if (!counter) return PDH_INVALID_HANDLE; + + value->CStatus = counter->status; + value->TimeStamp.dwLowDateTime = counter->stamp.dwLowDateTime; + value->TimeStamp.dwHighDateTime = counter->stamp.dwHighDateTime; + value->FirstValue = counter->one.largevalue;; + value->SecondValue = counter->two.largevalue; + value->MultiCount = 1; /* FIXME */ + + if (type) *type = counter->type; + return ERROR_SUCCESS; +} + +/*********************************************************************** * PdhOpenQueryA (PDH.@) */ PDH_STATUS WINAPI PdhOpenQueryA( LPCSTR source, DWORD_PTR userdata, PDH_HQUERY *query ) diff --git a/dlls/pdh/tests/pdh.c b/dlls/pdh/tests/pdh.c index 084fefc..6ddb097 100644 --- a/dlls/pdh/tests/pdh.c +++ b/dlls/pdh/tests/pdh.c @@ -145,6 +145,40 @@ static void test_PdhGetFormattedCounterValue( void ) ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); } +static void test_PdhGetRawCounterValue( void ) +{ + PDH_STATUS ret; + PDH_HQUERY query; + PDH_HCOUNTER counter; + PDH_RAW_COUNTER value; + + ret = PdhOpenQueryA( NULL, 0, &query ); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhGetRawCounterValue( NULL, NULL, &value ); + ok(ret == PDH_INVALID_HANDLE, "PdhGetRawCounterValue failed 0x%08x\n", ret); + + ret = PdhGetRawCounterValue( counter, NULL, NULL ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetRawCounterValue failed 0x%08x\n", ret); + + ret = PdhGetRawCounterValue( counter, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08x\n", ret); + ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %x", value.CStatus); + + ret = PdhCollectQueryData( query ); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + + ret = PdhGetRawCounterValue( counter, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08x\n", ret); + ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %x", value.CStatus); + + ret = PdhCloseQuery( query ); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); +} + static void test_PdhSetCounterScaleFactor( void ) { PDH_STATUS ret; @@ -184,5 +218,6 @@ START_TEST(pdh) test_open_close_query(); test_add_remove_counter(); test_PdhGetFormattedCounterValue(); + test_PdhGetRawCounterValue(); test_PdhSetCounterScaleFactor(); }
1
0
0
0
Hans Leidekker : pdh: Implement and test PdhSetCounterScaleFactor and PdhGetFormattedCounterValue .
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 0d516c5377bcce2410db0457bd063f76640bd4ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d516c5377bcce2410db0457b…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jul 9 20:55:13 2007 +0200 pdh: Implement and test PdhSetCounterScaleFactor and PdhGetFormattedCounterValue. --- dlls/pdh/pdh.spec | 4 +- dlls/pdh/pdh_main.c | 60 +++++++++++++++++++++++++++++++++++ dlls/pdh/tests/pdh.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 2 deletions(-) diff --git a/dlls/pdh/pdh.spec b/dlls/pdh/pdh.spec index 42a66ed..6dfc73d 100644 --- a/dlls/pdh/pdh.spec +++ b/dlls/pdh/pdh.spec @@ -57,7 +57,7 @@ @ stub PdhGetDllVersion @ stub PdhGetFormattedCounterArrayA @ stub PdhGetFormattedCounterArrayW -@ stub PdhGetFormattedCounterValue +@ stdcall PdhGetFormattedCounterValue(ptr long ptr ptr) @ stub PdhGetLogFileSize @ stub PdhGetLogFileTypeA @ stub PdhGetLogFileTypeW @@ -123,7 +123,7 @@ @ stdcall PdhRemoveCounter(ptr) @ stub PdhSelectDataSourceA @ stub PdhSelectDataSourceW -@ stub PdhSetCounterScaleFactor +@ stdcall PdhSetCounterScaleFactor(ptr long) @ stub PdhSetDefaultRealTimeDataSource @ stub PdhSetLogSetRunID @ stub PdhSetQueryTimeRange diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index f4b8b15..f89493e 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -19,6 +19,7 @@ */ #include <stdarg.h> +#include <math.h> #define NONAMELESSUNION #define NONAMELESSSTRUCT @@ -283,6 +284,49 @@ PDH_STATUS WINAPI PdhCollectQueryData( PDH_HQUERY handle ) } /*********************************************************************** + * PdhGetFormattedCounterValue (PDH.@) + */ +PDH_STATUS WINAPI PdhGetFormattedCounterValue( PDH_HCOUNTER handle, DWORD format, + LPDWORD type, PPDH_FMT_COUNTERVALUE value ) +{ + LONG factor; + struct counter *counter = handle; + + TRACE("%p %x %p %p\n", handle, format, type, value); + + if (!value) return PDH_INVALID_ARGUMENT; + if (!counter) return PDH_INVALID_HANDLE; + + if (counter->status) return PDH_INVALID_DATA; + + factor = counter->scale ? counter->scale : counter->defaultscale; + if (format & PDH_FMT_LONG) + { + if (format & PDH_FMT_1000) value->u.longValue = counter->two.longvalue * 1000; + else value->u.longValue = counter->two.longvalue * pow( 10, factor ); + } + else if (format & PDH_FMT_LARGE) + { + if (format & PDH_FMT_1000) value->u.longValue = counter->two.largevalue * 1000; + else value->u.largeValue = counter->two.largevalue * pow( 10, factor ); + } + else if (format & PDH_FMT_DOUBLE) + { + if (format & PDH_FMT_1000) value->u.longValue = counter->two.doublevalue * 1000; + else value->u.doubleValue = counter->two.doublevalue * pow( 10, factor ); + } + else + { + WARN("unknown format %x\n", format); + return PDH_INVALID_ARGUMENT; + } + value->CStatus = ERROR_SUCCESS; + + if (type) *type = counter->type; + return ERROR_SUCCESS; +} + +/*********************************************************************** * PdhOpenQueryA (PDH.@) */ PDH_STATUS WINAPI PdhOpenQueryA( LPCSTR source, DWORD_PTR userdata, PDH_HQUERY *query ) @@ -344,3 +388,19 @@ PDH_STATUS WINAPI PdhRemoveCounter( PDH_HCOUNTER handle ) return ERROR_SUCCESS; } + +/*********************************************************************** + * PdhSetCounterScaleFactor (PDH.@) + */ +PDH_STATUS WINAPI PdhSetCounterScaleFactor( PDH_HCOUNTER handle, LONG factor ) +{ + struct counter *counter = handle; + + TRACE("%p\n", handle); + + if (!counter) return PDH_INVALID_HANDLE; + if (factor < PDH_MIN_SCALE || factor > PDH_MAX_SCALE) return PDH_INVALID_ARGUMENT; + + counter->scale = factor; + return ERROR_SUCCESS; +} diff --git a/dlls/pdh/tests/pdh.c b/dlls/pdh/tests/pdh.c index f6d6921..084fefc 100644 --- a/dlls/pdh/tests/pdh.c +++ b/dlls/pdh/tests/pdh.c @@ -95,8 +95,94 @@ static void test_add_remove_counter( void ) ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); } +static void test_PdhGetFormattedCounterValue( void ) +{ + PDH_STATUS ret; + PDH_HQUERY query; + PDH_HCOUNTER counter; + PDH_FMT_COUNTERVALUE value; + + ret = PdhOpenQueryA( NULL, 0, &query ); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, NULL ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, &value ); + ok(ret == PDH_INVALID_HANDLE, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, NULL ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhCollectQueryData( query ); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_NOSCALE, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_NOCAP100, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_1000, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( counter, 2 ); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + + ret = PdhCloseQuery( query ); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); +} + +static void test_PdhSetCounterScaleFactor( void ) +{ + PDH_STATUS ret; + PDH_HQUERY query; + PDH_HCOUNTER counter; + + ret = PdhOpenQueryA( NULL, 0, &query ); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( NULL, 8 ); + ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( NULL, 1 ); + ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( counter, 8 ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( counter, -8 ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( counter, 7 ); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhSetCounterScaleFactor( counter, 0 ); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + + ret = PdhCloseQuery( query ); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); +} + START_TEST(pdh) { test_open_close_query(); test_add_remove_counter(); + test_PdhGetFormattedCounterValue(); + test_PdhSetCounterScaleFactor(); }
1
0
0
0
Hans Leidekker : pdh: Add tests for Pdh{Add, Remove}Counter and PdhCollectQueryData.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 5dfc2ead8074e14b61135dd5f6aea95f60003ba3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5dfc2ead8074e14b61135dd5f…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jul 9 20:55:02 2007 +0200 pdh: Add tests for Pdh{Add, Remove}Counter and PdhCollectQueryData. --- dlls/pdh/tests/pdh.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/pdh/tests/pdh.c b/dlls/pdh/tests/pdh.c index 872f2a1..f6d6921 100644 --- a/dlls/pdh/tests/pdh.c +++ b/dlls/pdh/tests/pdh.c @@ -48,7 +48,55 @@ static void test_open_close_query( void ) ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); } +static void test_add_remove_counter( void ) +{ + PDH_STATUS ret; + PDH_HQUERY query; + PDH_HCOUNTER counter; + + ret = PdhOpenQueryA( NULL, 0, &query ); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( NULL, "\\System\\System Up Time", 0, NULL ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( NULL, "\\System\\System Up Time", 0, &counter ); + ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( query, NULL, 0, &counter ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, NULL ); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhAddCounterA( query, "\\System\\System Down Time", 0, &counter ); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddCounterA failed 0x%08x\n", ret); + ok(!counter, "PdhAddCounterA failed %p\n", counter); + + ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + + ret = PdhCollectQueryData( NULL ); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); + + ret = PdhCollectQueryData( counter ); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); + + ret = PdhCollectQueryData( query ); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + + ret = PdhRemoveCounter( NULL ); + ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08x\n", ret); + + ret = PdhRemoveCounter( counter ); + ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); + + ret = PdhCloseQuery( query ); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); +} + START_TEST(pdh) { test_open_close_query(); + test_add_remove_counter(); }
1
0
0
0
Hans Leidekker : pdh: Add an uptime counter source based on GetTickCount.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: bdb218abcb5348e6e8aff62cdcc0d74d23a7224e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdb218abcb5348e6e8aff62cd…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jul 9 20:54:48 2007 +0200 pdh: Add an uptime counter source based on GetTickCount. --- dlls/pdh/pdh_main.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index b21391a..f4b8b15 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -150,10 +150,22 @@ struct source LONGLONG base; /* samples per second */ }; +static const WCHAR path_uptime[] = + {'\\','S','y','s','t','e','m', '\\', 'S','y','s','t','e','m',' ','U','p',' ','T','i','m','e',0}; + +static void CALLBACK collect_uptime( struct counter *counter ) +{ + counter->two.largevalue = GetTickCount(); /* FIXME */ + counter->status = PDH_CSTATUS_VALID_DATA; +} + +#define TYPE_UPTIME \ + (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS) + /* counter source registry */ static const struct source counter_sources[] = { - { NULL, NULL, 0, 0, 0 } + { path_uptime, collect_uptime, TYPE_UPTIME, -3, 1000 } }; /***********************************************************************
1
0
0
0
Detlef Riekenberg : advpack+setupapi: Remove unneeded checks before SetupCloseInfFile.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 6a95b93ec3abcea468397217822df29d5cda19f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a95b93ec3abcea4683972178…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jul 9 19:38:59 2007 +0200 advpack+setupapi: Remove unneeded checks before SetupCloseInfFile. --- dlls/advpack/install.c | 3 +-- dlls/setupapi/tests/parser.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index b7e997c..c5a5df0 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -512,8 +512,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, /* release the install instance information */ static void install_release(const ADVInfo *info) { - if (info->hinf && info->hinf != INVALID_HANDLE_VALUE) - SetupCloseInfFile(info->hinf); + SetupCloseInfFile(info->hinf); HeapFree(GetProcessHeap(), 0, info->inf_path); HeapFree(GetProcessHeap(), 0, info->inf_filename); diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index 2585f6d..2aaaa5e 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -167,7 +167,7 @@ static void test_invalid_files(void) ok( hinf != INVALID_HANDLE_VALUE, "file %u: Open failed\n", i ); ok( err == 0, "file %u: Error code set to %u\n", i, err ); } - if (hinf != INVALID_HANDLE_VALUE) SetupCloseInfFile( hinf ); + SetupCloseInfFile( hinf ); } }
1
0
0
0
Detlef Riekenberg : setupapi: Avoid crash in SetupCloseInfFile.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 8be4e8537c74a655ac535699eefe8c65a2f6445a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8be4e8537c74a655ac535699e…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jul 9 19:31:23 2007 +0200 setupapi: Avoid crash in SetupCloseInfFile. --- dlls/setupapi/parser.c | 2 +- dlls/setupapi/tests/parser.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c index 6ddc1f2..ea410f8 100644 --- a/dlls/setupapi/parser.c +++ b/dlls/setupapi/parser.c @@ -1231,7 +1231,7 @@ void WINAPI SetupCloseInfFile( HINF hinf ) struct inf_file *file = hinf; unsigned int i; - if (!file) return; + if (!hinf || (hinf == INVALID_HANDLE_VALUE)) return; for (i = 0; i < file->nb_sections; i++) HeapFree( GetProcessHeap(), 0, file->sections[i] ); HeapFree( GetProcessHeap(), 0, file->filename ); diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index 2bb493e..2585f6d 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -405,6 +405,11 @@ static void test_close_inf_file(void) SetLastError(0xdeadbeef); SetupCloseInfFile(NULL); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", GetLastError()); + + SetLastError(0xdeadbeef); + SetupCloseInfFile(INVALID_HANDLE_VALUE); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", GetLastError()); + } static const char *contents = "[Version]\n"
1
0
0
0
Stefan Dösinger : wined3d: Store the last active thread.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 9dedfd71e0211b46d58f1a0b17b1c3e8ca1eb0d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9dedfd71e0211b46d58f1a0b1…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Mon Jul 9 17:27:39 2007 +0200 wined3d: Store the last active thread. --- dlls/wined3d/context.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index b7834a2..32791b7 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -840,6 +840,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU if(This->lastActiveRenderTarget != target || tid != This->lastThread) { context = FindContext(This, target, tid); This->lastActiveRenderTarget = target; + This->lastThread = tid; } else { /* Stick to the old context */ context = This->activeContext;
1
0
0
0
Stefan Dösinger : wined3d: Make ActivateContext a bit smaller.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 1fb168f018c440e6d90c4756ea5367b991db7b98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fb168f018c440e6d90c4756e…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Mon Jul 9 00:48:53 2007 +0200 wined3d: Make ActivateContext a bit smaller. --- dlls/wined3d/context.c | 317 +++++++++++++++++++++++++----------------------- 1 files changed, 168 insertions(+), 149 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1fb168f018c440e6d90c4…
1
0
0
0
Stefan Dösinger : wined3d: Add CTXUSAGE_CLEAR context usage.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: fdadf26c207dc62e2885bd4042e86d852830f2a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdadf26c207dc62e2885bd404…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Mon Jul 9 16:57:58 2007 +0200 wined3d: Add CTXUSAGE_CLEAR context usage. --- dlls/wined3d/context.c | 13 +++++++++++++ dlls/wined3d/device.c | 7 +------ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 2707407..80f2f31 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -842,6 +842,19 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU /* This does not require any special states to be set up */ break; + case CTXUSAGE_CLEAR: + if(context->last_was_blit && GL_SUPPORT(NV_TEXTURE_SHADER2)) { + glEnable(GL_TEXTURE_SHADER_NV); + checkGLcall("glEnable(GL_TEXTURE_SHADER_NV)"); + } + + glEnable(GL_SCISSOR_TEST); + checkGLcall("glEnable GL_SCISSOR_TEST"); + context->last_was_blit = FALSE; + Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); + Context_MarkStateDirty(context, STATE_SCISSORRECT); + break; + case CTXUSAGE_DRAWPRIM: /* This needs all dirty states applied */ if(context->last_was_blit && GL_SUPPORT(NV_TEXTURE_SHADER2)) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index bcca5d7..520a4b3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4463,12 +4463,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun apply_fbo_state(iface); } - ActivateContext(This, This->render_targets[0], CTXUSAGE_RESOURCELOAD); - - glEnable(GL_SCISSOR_TEST); - checkGLcall("glEnable GL_SCISSOR_TEST"); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SCISSORRECT); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); + ActivateContext(This, This->render_targets[0], CTXUSAGE_CLEAR); if (Count > 0 && pRects) { curRect = pRects; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 86cad0b..1169310 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -527,6 +527,7 @@ typedef enum ContextUsage { CTXUSAGE_RESOURCELOAD = 1, /* Only loads textures: No State is applied */ CTXUSAGE_DRAWPRIM = 2, /* OpenGL states are set up for blitting DirectDraw surfacs */ CTXUSAGE_BLIT = 3, /* OpenGL states are set up 3D drawing */ + CTXUSAGE_CLEAR = 4, /* Drawable and states are set up for clearing */ } ContextUsage; void ActivateContext(IWineD3DDeviceImpl *device, IWineD3DSurface *target, ContextUsage usage);
1
0
0
0
Stefan Dösinger : wined3d: Print the fixed and unfixed vertex warning only when needed.
by Alexandre Julliard
10 Jul '07
10 Jul '07
Module: wine Branch: master Commit: 97cd8bab1bc21e9334ce4c28298c5cfeea90be5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97cd8bab1bc21e9334ce4c282…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Mon Jul 9 16:52:09 2007 +0200 wined3d: Print the fixed and unfixed vertex warning only when needed. --- dlls/wined3d/drawprim.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 1b03528..c1484d1 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -199,9 +199,11 @@ void primitiveDeclarationConvertToStridedData( data = IWineD3DVertexBufferImpl_GetMemory(This->stateBlock->streamSource[element->Stream], 0, &streamVBO); if(fixup) { if( streamVBO != 0) *fixup = TRUE; - else if(*fixup && !useVertexShaderFunction) { + else if(*fixup && !useVertexShaderFunction && + (element->Usage == WINED3DDECLUSAGE_COLOR || + element->Usage == WINED3DDECLUSAGE_POSITIONT)) { /* This may be bad with the fixed function pipeline */ - FIXME("Missing fixed and unfixed vertices, expect graphics glitches\n"); + FIXME("Missing vbo streams with unfixed colors or transformed position, expect problems\n"); } } }
1
0
0
0
← Newer
1
...
73
74
75
76
77
78
79
...
96
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
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200