Commit 071292be authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

pdh: Update PdhAddEnglishCounterA/W() to match Windows 10 >= 2004.

parent 6799667b
......@@ -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);
if (!query) return PDH_INVALID_ARGUMENT;
if (!counter) return PDH_INVALID_ARGUMENT;
if (!query) return PDH_INVALID_HANDLE;
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);
if (!query) return PDH_INVALID_ARGUMENT;
if (!counter) return PDH_INVALID_ARGUMENT;
if (!query) return PDH_INVALID_HANDLE;
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);
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 );
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);
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 );
ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment