pdh: Update PdhAddEnglishCounterA/W() to match Windows 10 >= 2004.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6799667b71
commit
071292bedd
|
@ -284,7 +284,8 @@ PDH_STATUS WINAPI PdhAddEnglishCounterA( PDH_HQUERY query, LPCSTR path,
|
||||||
{
|
{
|
||||||
TRACE("%p %s %lx %p\n", query, debugstr_a(path), userdata, counter);
|
TRACE("%p %s %lx %p\n", query, debugstr_a(path), userdata, counter);
|
||||||
|
|
||||||
if (!query) return PDH_INVALID_ARGUMENT;
|
if (!counter) return PDH_INVALID_ARGUMENT;
|
||||||
|
if (!query) return PDH_INVALID_HANDLE;
|
||||||
return PdhAddCounterA( query, path, userdata, counter );
|
return PdhAddCounterA( query, path, userdata, counter );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +297,8 @@ PDH_STATUS WINAPI PdhAddEnglishCounterW( PDH_HQUERY query, LPCWSTR path,
|
||||||
{
|
{
|
||||||
TRACE("%p %s %lx %p\n", query, debugstr_w(path), userdata, counter);
|
TRACE("%p %s %lx %p\n", query, debugstr_w(path), userdata, counter);
|
||||||
|
|
||||||
if (!query) return PDH_INVALID_ARGUMENT;
|
if (!counter) return PDH_INVALID_ARGUMENT;
|
||||||
|
if (!query) return PDH_INVALID_HANDLE;
|
||||||
return PdhAddCounterW( query, path, userdata, counter );
|
return PdhAddCounterW( query, path, userdata, counter );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,8 @@ static void test_PdhAddEnglishCounterA( void )
|
||||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret);
|
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret);
|
||||||
|
|
||||||
ret = pPdhAddEnglishCounterA( NULL, "\\System\\System Up Time", 0, &counter );
|
ret = pPdhAddEnglishCounterA( NULL, "\\System\\System Up Time", 0, &counter );
|
||||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret);
|
ok(ret == PDH_INVALID_HANDLE || broken(ret == PDH_INVALID_ARGUMENT) /* win10 <= 1909 */,
|
||||||
|
"PdhAddEnglishCounterA failed 0x%08x\n", ret);
|
||||||
|
|
||||||
ret = pPdhAddEnglishCounterA( query, NULL, 0, &counter );
|
ret = pPdhAddEnglishCounterA( query, NULL, 0, &counter );
|
||||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret);
|
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret);
|
||||||
|
@ -281,7 +282,8 @@ static void test_PdhAddEnglishCounterW( void )
|
||||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret);
|
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret);
|
||||||
|
|
||||||
ret = pPdhAddEnglishCounterW( NULL, system_uptime, 0, &counter );
|
ret = pPdhAddEnglishCounterW( NULL, system_uptime, 0, &counter );
|
||||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret);
|
ok(ret == PDH_INVALID_HANDLE || broken(ret == PDH_INVALID_ARGUMENT) /* win10 <= 1909 */,
|
||||||
|
"PdhAddEnglishCounterW failed 0x%08x\n", ret);
|
||||||
|
|
||||||
ret = pPdhAddEnglishCounterW( query, NULL, 0, &counter );
|
ret = pPdhAddEnglishCounterW( query, NULL, 0, &counter );
|
||||||
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret);
|
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret);
|
||||||
|
|
Loading…
Reference in New Issue