Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4705f8fe
Commit
4705f8fe
authored
Mar 03, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdh/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c10dc03e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
222 deletions
+221
-222
Makefile.in
dlls/pdh/tests/Makefile.in
+0
-1
pdh.c
dlls/pdh/tests/pdh.c
+221
-221
No files found.
dlls/pdh/tests/Makefile.in
View file @
4705f8fe
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
pdh.dll
TESTDLL
=
pdh.dll
IMPORTS
=
pdh
IMPORTS
=
pdh
...
...
dlls/pdh/tests/pdh.c
View file @
4705f8fe
...
@@ -84,22 +84,22 @@ static void test_PdhOpenQueryA( void )
...
@@ -84,22 +84,22 @@ static void test_PdhOpenQueryA( void )
PDH_HQUERY
query
;
PDH_HQUERY
query
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
NULL
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
NULL
);
ret
=
PdhCloseQuery
(
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
&
query
);
ret
=
PdhCloseQuery
(
&
query
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhOpenQueryW
(
void
)
static
void
test_PdhOpenQueryW
(
void
)
...
@@ -108,22 +108,22 @@ static void test_PdhOpenQueryW( void )
...
@@ -108,22 +108,22 @@ static void test_PdhOpenQueryW( void )
PDH_HQUERY
query
;
PDH_HQUERY
query
;
ret
=
PdhOpenQueryW
(
NULL
,
0
,
NULL
);
ret
=
PdhOpenQueryW
(
NULL
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhOpenQueryW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhOpenQueryW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
NULL
);
ret
=
PdhCloseQuery
(
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
&
query
);
ret
=
PdhCloseQuery
(
&
query
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhAddCounterA
(
void
)
static
void
test_PdhAddCounterA
(
void
)
...
@@ -133,46 +133,46 @@ static void test_PdhAddCounterA( void )
...
@@ -133,46 +133,46 @@ static void test_PdhAddCounterA( void )
PDH_HCOUNTER
counter
;
PDH_HCOUNTER
counter
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ret
=
PdhAddCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
NULL
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
NULL
,
0
,
&
counter
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
Nonexistent Counter"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
Nonexistent Counter"
,
0
,
&
counter
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
||
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
||
broken
(
ret
==
PDH_INVALID_PATH
),
/* Win2K */
broken
(
ret
==
PDH_INVALID_PATH
),
/* Win2K */
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
counter
,
"PdhAddCounterA failed %p
\n
"
,
counter
);
ok
(
!
counter
,
"PdhAddCounterA failed %p
\n
"
,
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
NULL
);
ret
=
PdhCollectQueryData
(
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
counter
);
ret
=
PdhCollectQueryData
(
counter
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhRemoveCounter
(
NULL
);
ret
=
PdhRemoveCounter
(
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhRemoveCounter failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhRemoveCounter failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhRemoveCounter
(
counter
);
ret
=
PdhRemoveCounter
(
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhAddCounterW
(
void
)
static
void
test_PdhAddCounterW
(
void
)
...
@@ -182,46 +182,46 @@ static void test_PdhAddCounterW( void )
...
@@ -182,46 +182,46 @@ static void test_PdhAddCounterW( void )
PDH_HCOUNTER
counter
;
PDH_HCOUNTER
counter
;
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterW
(
NULL
,
percentage_processor_time
,
0
,
NULL
);
ret
=
PdhAddCounterW
(
NULL
,
percentage_processor_time
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterW
(
NULL
,
percentage_processor_time
,
0
,
&
counter
);
ret
=
PdhAddCounterW
(
NULL
,
percentage_processor_time
,
0
,
&
counter
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterW
(
query
,
NULL
,
0
,
&
counter
);
ret
=
PdhAddCounterW
(
query
,
NULL
,
0
,
&
counter
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterW
(
query
,
percentage_processor_time
,
0
,
NULL
);
ret
=
PdhAddCounterW
(
query
,
percentage_processor_time
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterW
(
query
,
nonexistent_counter
,
0
,
&
counter
);
ret
=
PdhAddCounterW
(
query
,
nonexistent_counter
,
0
,
&
counter
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
||
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
||
broken
(
ret
==
PDH_INVALID_PATH
),
/* Win2K */
broken
(
ret
==
PDH_INVALID_PATH
),
/* Win2K */
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
counter
,
"PdhAddCounterW failed %p
\n
"
,
counter
);
ok
(
!
counter
,
"PdhAddCounterW failed %p
\n
"
,
counter
);
ret
=
PdhAddCounterW
(
query
,
percentage_processor_time
,
0
,
&
counter
);
ret
=
PdhAddCounterW
(
query
,
percentage_processor_time
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
NULL
);
ret
=
PdhCollectQueryData
(
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
counter
);
ret
=
PdhCollectQueryData
(
counter
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhRemoveCounter
(
NULL
);
ret
=
PdhRemoveCounter
(
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhRemoveCounter failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhRemoveCounter failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhRemoveCounter
(
counter
);
ret
=
PdhRemoveCounter
(
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhAddEnglishCounterA
(
void
)
static
void
test_PdhAddEnglishCounterA
(
void
)
...
@@ -231,39 +231,39 @@ static void test_PdhAddEnglishCounterA( void )
...
@@ -231,39 +231,39 @@ static void test_PdhAddEnglishCounterA( void )
PDH_HCOUNTER
counter
;
PDH_HCOUNTER
counter
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
PDH_NO_DATA
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_NO_DATA
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ret
=
pPdhAddEnglishCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
pPdhAddEnglishCounterA
(
NULL
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
PDH_INVALID_HANDLE
||
broken
(
ret
==
PDH_INVALID_ARGUMENT
)
/* win10 <= 1909 */
,
ok
(
ret
==
PDH_INVALID_HANDLE
||
broken
(
ret
==
PDH_INVALID_ARGUMENT
)
/* win10 <= 1909 */
,
"PdhAddEnglishCounterA failed 0x%08x
\n
"
,
ret
);
"PdhAddEnglishCounterA failed 0x%08
l
x
\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%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ret
=
pPdhAddEnglishCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterA
(
query
,
"
\\
System
\\
System Down Time"
,
0
,
&
counter
);
ret
=
pPdhAddEnglishCounterA
(
query
,
"
\\
System
\\
System Down Time"
,
0
,
&
counter
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhAddEnglishCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhAddEnglishCounterA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
counter
,
"PdhAddEnglishCounterA failed %p
\n
"
,
counter
);
ok
(
!
counter
,
"PdhAddEnglishCounterA failed %p
\n
"
,
counter
);
ret
=
pPdhAddEnglishCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
pPdhAddEnglishCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddEnglishCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddEnglishCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhRemoveCounter
(
counter
);
ret
=
PdhRemoveCounter
(
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhAddEnglishCounterW
(
void
)
static
void
test_PdhAddEnglishCounterW
(
void
)
...
@@ -273,39 +273,39 @@ static void test_PdhAddEnglishCounterW( void )
...
@@ -273,39 +273,39 @@ static void test_PdhAddEnglishCounterW( void )
PDH_HCOUNTER
counter
;
PDH_HCOUNTER
counter
;
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
PDH_NO_DATA
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_NO_DATA
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterW
(
NULL
,
system_uptime
,
0
,
NULL
);
ret
=
pPdhAddEnglishCounterW
(
NULL
,
system_uptime
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterW
(
NULL
,
system_uptime
,
0
,
&
counter
);
ret
=
pPdhAddEnglishCounterW
(
NULL
,
system_uptime
,
0
,
&
counter
);
ok
(
ret
==
PDH_INVALID_HANDLE
||
broken
(
ret
==
PDH_INVALID_ARGUMENT
)
/* win10 <= 1909 */
,
ok
(
ret
==
PDH_INVALID_HANDLE
||
broken
(
ret
==
PDH_INVALID_ARGUMENT
)
/* win10 <= 1909 */
,
"PdhAddEnglishCounterW failed 0x%08x
\n
"
,
ret
);
"PdhAddEnglishCounterW failed 0x%08
l
x
\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%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterW
(
query
,
system_uptime
,
0
,
NULL
);
ret
=
pPdhAddEnglishCounterW
(
query
,
system_uptime
,
0
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhAddEnglishCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhAddEnglishCounterW
(
query
,
nonexistent_counter
,
0
,
&
counter
);
ret
=
pPdhAddEnglishCounterW
(
query
,
nonexistent_counter
,
0
,
&
counter
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhAddEnglishCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhAddEnglishCounterW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
counter
,
"PdhAddEnglishCounterA failed %p
\n
"
,
counter
);
ok
(
!
counter
,
"PdhAddEnglishCounterA failed %p
\n
"
,
counter
);
ret
=
pPdhAddEnglishCounterW
(
query
,
system_uptime
,
0
,
&
counter
);
ret
=
pPdhAddEnglishCounterW
(
query
,
system_uptime
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddEnglishCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddEnglishCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhRemoveCounter
(
counter
);
ret
=
PdhRemoveCounter
(
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhRemoveCounter failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhCollectQueryDataWithTime
(
void
)
static
void
test_PdhCollectQueryDataWithTime
(
void
)
...
@@ -316,28 +316,28 @@ static void test_PdhCollectQueryDataWithTime( void )
...
@@ -316,28 +316,28 @@ static void test_PdhCollectQueryDataWithTime( void )
LONGLONG
time
;
LONGLONG
time
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
PDH_NO_DATA
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_NO_DATA
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhCollectQueryDataWithTime
(
NULL
,
NULL
);
ret
=
pPdhCollectQueryDataWithTime
(
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhCollectQueryDataWithTime failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhCollectQueryDataWithTime failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhCollectQueryDataWithTime
(
query
,
NULL
);
ret
=
pPdhCollectQueryDataWithTime
(
query
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhCollectQueryDataWithTime failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhCollectQueryDataWithTime failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhCollectQueryDataWithTime
(
NULL
,
&
time
);
ret
=
pPdhCollectQueryDataWithTime
(
NULL
,
&
time
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryDataWithTime failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryDataWithTime failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhCollectQueryDataWithTime
(
query
,
&
time
);
ret
=
pPdhCollectQueryDataWithTime
(
query
,
&
time
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryDataWithTime failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryDataWithTime failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhGetFormattedCounterValue
(
void
)
static
void
test_PdhGetFormattedCounterValue
(
void
)
...
@@ -348,46 +348,46 @@ static void test_PdhGetFormattedCounterValue( void )
...
@@ -348,46 +348,46 @@ static void test_PdhGetFormattedCounterValue( void )
PDH_FMT_COUNTERVALUE
value
;
PDH_FMT_COUNTERVALUE
value
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
NULL
,
PDH_FMT_LARGE
,
NULL
,
NULL
);
ret
=
PdhGetFormattedCounterValue
(
NULL
,
PDH_FMT_LARGE
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
NULL
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
NULL
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
NULL
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
|
PDH_FMT_NOSCALE
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
|
PDH_FMT_NOSCALE
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
|
PDH_FMT_NOCAP100
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
|
PDH_FMT_NOCAP100
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
|
PDH_FMT_1000
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
|
PDH_FMT_1000
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
2
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
2
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ret
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhGetRawCounterValue
(
void
)
static
void
test_PdhGetRawCounterValue
(
void
)
...
@@ -398,30 +398,30 @@ static void test_PdhGetRawCounterValue( void )
...
@@ -398,30 +398,30 @@ static void test_PdhGetRawCounterValue( void )
PDH_RAW_COUNTER
value
;
PDH_RAW_COUNTER
value
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetRawCounterValue
(
NULL
,
NULL
,
&
value
);
ret
=
PdhGetRawCounterValue
(
NULL
,
NULL
,
&
value
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhGetRawCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhGetRawCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetRawCounterValue
(
counter
,
NULL
,
NULL
);
ret
=
PdhGetRawCounterValue
(
counter
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetRawCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetRawCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetRawCounterValue
(
counter
,
NULL
,
&
value
);
ret
=
PdhGetRawCounterValue
(
counter
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetRawCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetRawCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ok
(
value
.
CStatus
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS got %x
\n
"
,
value
.
CStatus
);
ok
(
value
.
CStatus
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS got %
l
x
\n
"
,
value
.
CStatus
);
ret
=
PdhCollectQueryData
(
query
);
ret
=
PdhCollectQueryData
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetRawCounterValue
(
counter
,
NULL
,
&
value
);
ret
=
PdhGetRawCounterValue
(
counter
,
NULL
,
&
value
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetRawCounterValue failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetRawCounterValue failed 0x%08
l
x
\n
"
,
ret
);
ok
(
value
.
CStatus
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS got %x
\n
"
,
value
.
CStatus
);
ok
(
value
.
CStatus
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS got %
l
x
\n
"
,
value
.
CStatus
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhSetCounterScaleFactor
(
void
)
static
void
test_PdhSetCounterScaleFactor
(
void
)
...
@@ -431,31 +431,31 @@ static void test_PdhSetCounterScaleFactor( void )
...
@@ -431,31 +431,31 @@ static void test_PdhSetCounterScaleFactor( void )
PDH_HCOUNTER
counter
;
PDH_HCOUNTER
counter
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
NULL
,
8
);
ret
=
PdhSetCounterScaleFactor
(
NULL
,
8
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
NULL
,
1
);
ret
=
PdhSetCounterScaleFactor
(
NULL
,
1
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
8
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
8
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
-
8
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
-
8
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
7
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
7
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
0
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhGetCounterTimeBase
(
void
)
static
void
test_PdhGetCounterTimeBase
(
void
)
...
@@ -466,25 +466,25 @@ static void test_PdhGetCounterTimeBase( void )
...
@@ -466,25 +466,25 @@ static void test_PdhGetCounterTimeBase( void )
LONGLONG
base
;
LONGLONG
base
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterTimeBase
(
NULL
,
NULL
);
ret
=
PdhGetCounterTimeBase
(
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterTimeBase failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterTimeBase failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterTimeBase
(
NULL
,
&
base
);
ret
=
PdhGetCounterTimeBase
(
NULL
,
&
base
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhGetCounterTimeBase failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
,
"PdhGetCounterTimeBase failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterTimeBase
(
counter
,
NULL
);
ret
=
PdhGetCounterTimeBase
(
counter
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterTimeBase failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterTimeBase failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterTimeBase
(
counter
,
&
base
);
ret
=
PdhGetCounterTimeBase
(
counter
,
&
base
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterTimeBase failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterTimeBase failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhGetCounterInfoA
(
void
)
static
void
test_PdhGetCounterInfoA
(
void
)
...
@@ -496,49 +496,49 @@ static void test_PdhGetCounterInfoA( void )
...
@@ -496,49 +496,49 @@ static void test_PdhGetCounterInfoA( void )
DWORD
size
;
DWORD
size
;
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ret
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoA
(
NULL
,
0
,
NULL
,
NULL
);
ret
=
PdhGetCounterInfoA
(
NULL
,
0
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
NULL
,
NULL
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
NULL
,
&
info
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
NULL
,
&
info
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
size
=
sizeof
(
info
)
-
1
;
size
=
sizeof
(
info
)
-
1
;
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
NULL
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
NULL
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
size
=
sizeof
(
info
);
size
=
sizeof
(
info
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
size
==
sizeof
(
info
),
"PdhGetCounterInfoA failed %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
info
),
"PdhGetCounterInfoA failed %
l
d
\n
"
,
size
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
info
.
lScale
==
0
,
"lScale %d
\n
"
,
info
.
lScale
);
ok
(
info
.
lScale
==
0
,
"lScale %
l
d
\n
"
,
info
.
lScale
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
0
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
info
.
lScale
==
0
,
"lScale %d
\n
"
,
info
.
lScale
);
ok
(
info
.
lScale
==
0
,
"lScale %
l
d
\n
"
,
info
.
lScale
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
-
5
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
-
5
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoA
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
info
.
lScale
==
-
5
,
"lScale %d
\n
"
,
info
.
lScale
);
ok
(
info
.
lScale
==
-
5
,
"lScale %
l
d
\n
"
,
info
.
lScale
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhGetCounterInfoW
(
void
)
static
void
test_PdhGetCounterInfoW
(
void
)
...
@@ -550,49 +550,49 @@ static void test_PdhGetCounterInfoW( void )
...
@@ -550,49 +550,49 @@ static void test_PdhGetCounterInfoW( void )
DWORD
size
;
DWORD
size
;
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ret
=
PdhOpenQueryW
(
NULL
,
0
,
&
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhOpenQueryW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhAddCounterW
(
query
,
percentage_processor_time
,
0
,
&
counter
);
ret
=
PdhAddCounterW
(
query
,
percentage_processor_time
,
0
,
&
counter
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhAddCounterW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoW
(
NULL
,
0
,
NULL
,
NULL
);
ret
=
PdhGetCounterInfoW
(
NULL
,
0
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_HANDLE
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_HANDLE
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
NULL
,
NULL
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
NULL
,
&
info
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
NULL
,
&
info
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
size
=
sizeof
(
info
)
-
1
;
size
=
sizeof
(
info
)
-
1
;
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
NULL
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
NULL
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INVALID_ARGUMENT
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
size
=
sizeof
(
info
);
size
=
sizeof
(
info
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
size
==
sizeof
(
info
),
"PdhGetCounterInfoW failed %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
info
),
"PdhGetCounterInfoW failed %
l
d
\n
"
,
size
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
info
.
lScale
==
0
,
"lScale %d
\n
"
,
info
.
lScale
);
ok
(
info
.
lScale
==
0
,
"lScale %
l
d
\n
"
,
info
.
lScale
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
0
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
info
.
lScale
==
0
,
"lScale %d
\n
"
,
info
.
lScale
);
ok
(
info
.
lScale
==
0
,
"lScale %
l
d
\n
"
,
info
.
lScale
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
-
5
);
ret
=
PdhSetCounterScaleFactor
(
counter
,
-
5
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhSetCounterScaleFactor failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ret
=
PdhGetCounterInfoW
(
counter
,
0
,
&
size
,
&
info
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhGetCounterInfoW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
info
.
lScale
==
-
5
,
"lScale %d
\n
"
,
info
.
lScale
);
ok
(
info
.
lScale
==
-
5
,
"lScale %
l
d
\n
"
,
info
.
lScale
);
ret
=
PdhCloseQuery
(
query
);
ret
=
PdhCloseQuery
(
query
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhLookupPerfIndexByNameA
(
void
)
static
void
test_PdhLookupPerfIndexByNameA
(
void
)
...
@@ -601,24 +601,24 @@ static void test_PdhLookupPerfIndexByNameA( void )
...
@@ -601,24 +601,24 @@ static void test_PdhLookupPerfIndexByNameA( void )
DWORD
index
;
DWORD
index
;
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
NULL
,
NULL
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
NULL
,
&
index
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
NULL
,
&
index
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"No Counter"
,
&
index
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"No Counter"
,
&
index
);
ok
(
ret
==
PDH_STRING_NOT_FOUND
,
"PdhLookupPerfIndexByNameA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_STRING_NOT_FOUND
,
"PdhLookupPerfIndexByNameA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"% Processor Time"
,
NULL
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"% Processor Time"
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"% Processor Time"
,
&
index
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"% Processor Time"
,
&
index
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
index
==
6
,
"PdhLookupPerfIndexByNameA failed %d
\n
"
,
index
);
ok
(
index
==
6
,
"PdhLookupPerfIndexByNameA failed %
l
d
\n
"
,
index
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"System Up Time"
,
&
index
);
ret
=
PdhLookupPerfIndexByNameA
(
NULL
,
"System Up Time"
,
&
index
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
index
==
674
,
"PdhLookupPerfIndexByNameA failed %d
\n
"
,
index
);
ok
(
index
==
674
,
"PdhLookupPerfIndexByNameA failed %
l
d
\n
"
,
index
);
}
}
static
void
test_PdhLookupPerfIndexByNameW
(
void
)
static
void
test_PdhLookupPerfIndexByNameW
(
void
)
...
@@ -627,24 +627,24 @@ static void test_PdhLookupPerfIndexByNameW( void )
...
@@ -627,24 +627,24 @@ static void test_PdhLookupPerfIndexByNameW( void )
DWORD
index
;
DWORD
index
;
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
NULL
,
NULL
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
NULL
,
&
index
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
NULL
,
&
index
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
L"No Counter"
,
&
index
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
L"No Counter"
,
&
index
);
ok
(
ret
==
PDH_STRING_NOT_FOUND
,
"PdhLookupPerfIndexByNameW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_STRING_NOT_FOUND
,
"PdhLookupPerfIndexByNameW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
processor_time
,
NULL
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
processor_time
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfIndexByNameW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
processor_time
,
&
index
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
processor_time
,
&
index
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
index
==
6
,
"PdhLookupPerfIndexByNameW failed %d
\n
"
,
index
);
ok
(
index
==
6
,
"PdhLookupPerfIndexByNameW failed %
l
d
\n
"
,
index
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
uptime
,
&
index
);
ret
=
PdhLookupPerfIndexByNameW
(
NULL
,
uptime
,
&
index
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfIndexByNameW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
index
==
674
,
"PdhLookupPerfIndexByNameW failed %d
\n
"
,
index
);
ok
(
index
==
674
,
"PdhLookupPerfIndexByNameW failed %
l
d
\n
"
,
index
);
}
}
static
void
test_PdhLookupPerfNameByIndexA
(
void
)
static
void
test_PdhLookupPerfNameByIndexA
(
void
)
...
@@ -654,31 +654,31 @@ static void test_PdhLookupPerfNameByIndexA( void )
...
@@ -654,31 +654,31 @@ static void test_PdhLookupPerfNameByIndexA( void )
DWORD
size
;
DWORD
size
;
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
0
,
NULL
,
NULL
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
0
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfNameByIndexA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfNameByIndexA failed 0x%08
l
x
\n
"
,
ret
);
size
=
0
;
size
=
0
;
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
6
,
buffer
,
&
size
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
6
,
buffer
,
&
size
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INSUFFICIENT_BUFFER
,
"PdhLookupPerfNameByIndexA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INSUFFICIENT_BUFFER
,
"PdhLookupPerfNameByIndexA failed 0x%08
l
x
\n
"
,
ret
);
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
6
,
buffer
,
&
size
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
6
,
buffer
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buffer
,
"% Processor Time"
),
ok
(
!
lstrcmpA
(
buffer
,
"% Processor Time"
),
"PdhLookupPerfNameByIndexA failed, got %s expected
\'
%% Processor Time
\'\n
"
,
buffer
);
"PdhLookupPerfNameByIndexA failed, got %s expected
\'
%% Processor Time
\'\n
"
,
buffer
);
ok
(
size
==
sizeof
(
"% Processor Time"
),
"PdhLookupPerfNameByIndexA failed %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
"% Processor Time"
),
"PdhLookupPerfNameByIndexA failed %
l
d
\n
"
,
size
);
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
674
,
NULL
,
&
size
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
674
,
NULL
,
&
size
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
||
ok
(
ret
==
PDH_INVALID_ARGUMENT
||
ret
==
PDH_MORE_DATA
,
/* win2k3 */
ret
==
PDH_MORE_DATA
,
/* win2k3 */
"PdhLookupPerfNameByIndexA failed 0x%08x
\n
"
,
ret
);
"PdhLookupPerfNameByIndexA failed 0x%08
l
x
\n
"
,
ret
);
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
674
,
buffer
,
&
size
);
ret
=
PdhLookupPerfNameByIndexA
(
NULL
,
674
,
buffer
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buffer
,
"System Up Time"
),
ok
(
!
lstrcmpA
(
buffer
,
"System Up Time"
),
"PdhLookupPerfNameByIndexA failed, got %s expected
\'
System Up Time
\'\n
"
,
buffer
);
"PdhLookupPerfNameByIndexA failed, got %s expected
\'
System Up Time
\'\n
"
,
buffer
);
ok
(
size
==
sizeof
(
"System Up Time"
),
"PdhLookupPerfNameByIndexA failed %d
\n
"
,
size
);
ok
(
size
==
sizeof
(
"System Up Time"
),
"PdhLookupPerfNameByIndexA failed %
l
d
\n
"
,
size
);
}
}
static
void
test_PdhLookupPerfNameByIndexW
(
void
)
static
void
test_PdhLookupPerfNameByIndexW
(
void
)
...
@@ -688,27 +688,27 @@ static void test_PdhLookupPerfNameByIndexW( void )
...
@@ -688,27 +688,27 @@ static void test_PdhLookupPerfNameByIndexW( void )
DWORD
size
;
DWORD
size
;
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
0
,
NULL
,
NULL
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
0
,
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfNameByIndexW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhLookupPerfNameByIndexW failed 0x%08
l
x
\n
"
,
ret
);
size
=
0
;
size
=
0
;
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
6
,
buffer
,
&
size
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
6
,
buffer
,
&
size
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INSUFFICIENT_BUFFER
,
"PdhLookupPerfNameByIndexW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_MORE_DATA
||
ret
==
PDH_INSUFFICIENT_BUFFER
,
"PdhLookupPerfNameByIndexW failed 0x%08
l
x
\n
"
,
ret
);
size
=
ARRAY_SIZE
(
buffer
);
size
=
ARRAY_SIZE
(
buffer
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
6
,
buffer
,
&
size
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
6
,
buffer
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
size
==
ARRAY_SIZE
(
processor_time
),
"PdhLookupPerfNameByIndexW failed %d
\n
"
,
size
);
ok
(
size
==
ARRAY_SIZE
(
processor_time
),
"PdhLookupPerfNameByIndexW failed %
l
d
\n
"
,
size
);
size
=
ARRAY_SIZE
(
buffer
);
size
=
ARRAY_SIZE
(
buffer
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
674
,
NULL
,
&
size
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
674
,
NULL
,
&
size
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
||
ok
(
ret
==
PDH_INVALID_ARGUMENT
||
ret
==
PDH_MORE_DATA
,
/* win2k3 */
ret
==
PDH_MORE_DATA
,
/* win2k3 */
"PdhLookupPerfNameByIndexW failed 0x%08x
\n
"
,
ret
);
"PdhLookupPerfNameByIndexW failed 0x%08
l
x
\n
"
,
ret
);
size
=
ARRAY_SIZE
(
buffer
);
size
=
ARRAY_SIZE
(
buffer
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
674
,
buffer
,
&
size
);
ret
=
PdhLookupPerfNameByIndexW
(
NULL
,
674
,
buffer
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhLookupPerfNameByIndexW failed 0x%08
l
x
\n
"
,
ret
);
ok
(
size
==
ARRAY_SIZE
(
uptime
),
"PdhLookupPerfNameByIndexW failed %d
\n
"
,
size
);
ok
(
size
==
ARRAY_SIZE
(
uptime
),
"PdhLookupPerfNameByIndexW failed %
l
d
\n
"
,
size
);
}
}
static
void
test_PdhValidatePathA
(
void
)
static
void
test_PdhValidatePathA
(
void
)
...
@@ -716,22 +716,22 @@ static void test_PdhValidatePathA( void )
...
@@ -716,22 +716,22 @@ static void test_PdhValidatePathA( void )
PDH_STATUS
ret
;
PDH_STATUS
ret
;
ret
=
PdhValidatePathA
(
NULL
);
ret
=
PdhValidatePathA
(
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathA
(
""
);
ret
=
PdhValidatePathA
(
""
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathA
(
"
\\
System"
);
ret
=
PdhValidatePathA
(
"
\\
System"
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathA
(
"System Up Time"
);
ret
=
PdhValidatePathA
(
"System Up Time"
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathA
(
"
\\
System
\\
Nonexistent Counter"
);
ret
=
PdhValidatePathA
(
"
\\
System
\\
Nonexistent Counter"
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathA
(
"
\\
System
\\
System Up Time"
);
ret
=
PdhValidatePathA
(
"
\\
System
\\
System Up Time"
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathA failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhValidatePathW
(
void
)
static
void
test_PdhValidatePathW
(
void
)
...
@@ -739,22 +739,22 @@ static void test_PdhValidatePathW( void )
...
@@ -739,22 +739,22 @@ static void test_PdhValidatePathW( void )
PDH_STATUS
ret
;
PDH_STATUS
ret
;
ret
=
PdhValidatePathW
(
NULL
);
ret
=
PdhValidatePathW
(
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathW
(
L""
);
ret
=
PdhValidatePathW
(
L""
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathW
(
L"
\\
System"
);
ret
=
PdhValidatePathW
(
L"
\\
System"
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathW
(
uptime
);
ret
=
PdhValidatePathW
(
uptime
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathW
(
nonexistent_counter
);
ret
=
PdhValidatePathW
(
nonexistent_counter
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
PdhValidatePathW
(
system_uptime
);
ret
=
PdhValidatePathW
(
system_uptime
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathW failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhValidatePathExA
(
void
)
static
void
test_PdhValidatePathExA
(
void
)
...
@@ -762,22 +762,22 @@ static void test_PdhValidatePathExA( void )
...
@@ -762,22 +762,22 @@ static void test_PdhValidatePathExA( void )
PDH_STATUS
ret
;
PDH_STATUS
ret
;
ret
=
pPdhValidatePathExA
(
NULL
,
NULL
);
ret
=
pPdhValidatePathExA
(
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExA
(
NULL
,
""
);
ret
=
pPdhValidatePathExA
(
NULL
,
""
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExA
(
NULL
,
"
\\
System"
);
ret
=
pPdhValidatePathExA
(
NULL
,
"
\\
System"
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExA
(
NULL
,
"System Up Time"
);
ret
=
pPdhValidatePathExA
(
NULL
,
"System Up Time"
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExA
(
NULL
,
"
\\
System
\\
System Down Time"
);
ret
=
pPdhValidatePathExA
(
NULL
,
"
\\
System
\\
System Down Time"
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathExA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathExA failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExA
(
NULL
,
"
\\
System
\\
System Up Time"
);
ret
=
pPdhValidatePathExA
(
NULL
,
"
\\
System
\\
System Up Time"
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathExA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathExA failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhValidatePathExW
(
void
)
static
void
test_PdhValidatePathExW
(
void
)
...
@@ -785,22 +785,22 @@ static void test_PdhValidatePathExW( void )
...
@@ -785,22 +785,22 @@ static void test_PdhValidatePathExW( void )
PDH_STATUS
ret
;
PDH_STATUS
ret
;
ret
=
pPdhValidatePathExW
(
NULL
,
NULL
);
ret
=
pPdhValidatePathExW
(
NULL
,
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExW
(
NULL
,
L""
);
ret
=
pPdhValidatePathExW
(
NULL
,
L""
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhValidatePathExW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExW
(
NULL
,
L"
\\
System"
);
ret
=
pPdhValidatePathExW
(
NULL
,
L"
\\
System"
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExW
(
NULL
,
uptime
);
ret
=
pPdhValidatePathExW
(
NULL
,
uptime
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_BAD_COUNTERNAME
,
"PdhValidatePathExW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExW
(
NULL
,
nonexistent_counter
);
ret
=
pPdhValidatePathExW
(
NULL
,
nonexistent_counter
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathExW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_CSTATUS_NO_COUNTER
,
"PdhValidatePathExW failed 0x%08
l
x
\n
"
,
ret
);
ret
=
pPdhValidatePathExW
(
NULL
,
system_uptime
);
ret
=
pPdhValidatePathExW
(
NULL
,
system_uptime
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathExW failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhValidatePathExW failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhCollectQueryDataEx
(
void
)
static
void
test_PdhCollectQueryDataEx
(
void
)
...
@@ -813,25 +813,25 @@ static void test_PdhCollectQueryDataEx(void)
...
@@ -813,25 +813,25 @@ static void test_PdhCollectQueryDataEx(void)
UINT
i
;
UINT
i
;
status
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
status
=
PdhOpenQueryA
(
NULL
,
0
,
&
query
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhOpenQuery failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhOpenQuery failed 0x%08
l
x
\n
"
,
status
);
event
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
"winetest"
);
event
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
"winetest"
);
ok
(
event
!=
NULL
,
"CreateEvent failed
\n
"
);
ok
(
event
!=
NULL
,
"CreateEvent failed
\n
"
);
status
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
status
=
PdhAddCounterA
(
query
,
"
\\
System
\\
System Up Time"
,
0
,
&
counter
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhAddCounterA failed 0x%08
l
x
\n
"
,
status
);
status
=
PdhCollectQueryDataEx
(
NULL
,
1
,
event
);
status
=
PdhCollectQueryDataEx
(
NULL
,
1
,
event
);
ok
(
status
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryDataEx failed 0x%08x
\n
"
,
status
);
ok
(
status
==
PDH_INVALID_HANDLE
,
"PdhCollectQueryDataEx failed 0x%08
l
x
\n
"
,
status
);
status
=
PdhCollectQueryDataEx
(
query
,
1
,
NULL
);
status
=
PdhCollectQueryDataEx
(
query
,
1
,
NULL
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCollectQueryDataEx failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCollectQueryDataEx failed 0x%08
l
x
\n
"
,
status
);
status
=
PdhCollectQueryDataEx
(
query
,
1
,
event
);
status
=
PdhCollectQueryDataEx
(
query
,
1
,
event
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCollectQueryDataEx failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCollectQueryDataEx failed 0x%08
l
x
\n
"
,
status
);
status
=
PdhCollectQueryData
(
query
);
status
=
PdhCollectQueryData
(
query
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCollectQueryData failed 0x%08
l
x
\n
"
,
status
);
for
(
i
=
0
;
i
<
3
;
i
++
)
for
(
i
=
0
;
i
<
3
;
i
++
)
{
{
...
@@ -840,7 +840,7 @@ static void test_PdhCollectQueryDataEx(void)
...
@@ -840,7 +840,7 @@ static void test_PdhCollectQueryDataEx(void)
PDH_FMT_COUNTERVALUE
value
;
PDH_FMT_COUNTERVALUE
value
;
status
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
status
=
PdhGetFormattedCounterValue
(
counter
,
PDH_FMT_LARGE
,
NULL
,
&
value
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhGetFormattedCounterValue failed 0x%08
l
x
\n
"
,
status
);
trace
(
"uptime %s
\n
"
,
wine_dbgstr_longlong
(
U
(
value
).
largeValue
)
);
trace
(
"uptime %s
\n
"
,
wine_dbgstr_longlong
(
U
(
value
).
largeValue
)
);
}
}
...
@@ -850,7 +850,7 @@ static void test_PdhCollectQueryDataEx(void)
...
@@ -850,7 +850,7 @@ static void test_PdhCollectQueryDataEx(void)
ok
(
ret
,
"CloseHandle failed
\n
"
);
ok
(
ret
,
"CloseHandle failed
\n
"
);
status
=
PdhCloseQuery
(
query
);
status
=
PdhCloseQuery
(
query
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08x
\n
"
,
status
);
ok
(
status
==
ERROR_SUCCESS
,
"PdhCloseQuery failed 0x%08
l
x
\n
"
,
status
);
}
}
static
void
test_PdhMakeCounterPathA
(
void
)
static
void
test_PdhMakeCounterPathA
(
void
)
...
@@ -861,63 +861,63 @@ static void test_PdhMakeCounterPathA(void)
...
@@ -861,63 +861,63 @@ static void test_PdhMakeCounterPathA(void)
DWORD
buflen
;
DWORD
buflen
;
ret
=
PdhMakeCounterPathA
(
NULL
,
NULL
,
NULL
,
0
);
ret
=
PdhMakeCounterPathA
(
NULL
,
NULL
,
NULL
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
buflen
=
0
;
buflen
=
0
;
ret
=
PdhMakeCounterPathA
(
NULL
,
NULL
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
NULL
,
NULL
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
if
(
0
)
{
/* Crashes on Windows 10 >= 2004 */
if
(
0
)
{
/* Crashes on Windows 10 >= 2004 */
buflen
=
0
;
buflen
=
0
;
ret
=
PdhMakeCounterPathA
(
NULL
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
NULL
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
}
}
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
memset
(
&
e
,
0
,
sizeof
(
e
));
memset
(
&
e
,
0
,
sizeof
(
e
));
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
buffer
[
0
]
=
0
;
buffer
[
0
]
=
0
;
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szMachineName
=
(
char
*
)
"machine"
;
e
.
szMachineName
=
(
char
*
)
"machine"
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
buffer
[
0
]
=
0
;
buffer
[
0
]
=
0
;
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szObjectName
=
(
char
*
)
"object"
;
e
.
szObjectName
=
(
char
*
)
"object"
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
buffer
[
0
]
=
0
;
buffer
[
0
]
=
0
;
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szInstanceName
=
(
char
*
)
"instance"
;
e
.
szInstanceName
=
(
char
*
)
"instance"
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
buffer
[
0
]
=
0
;
buffer
[
0
]
=
0
;
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szParentInstance
=
(
char
*
)
"parent"
;
e
.
szParentInstance
=
(
char
*
)
"parent"
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
buffer
[
0
]
=
0
;
buffer
[
0
]
=
0
;
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
dwInstanceIndex
=
1
;
e
.
dwInstanceIndex
=
1
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
""
),
"expected
\"
machine
\"
got %s
\n
"
,
buffer
);
buffer
[
0
]
=
0
;
buffer
[
0
]
=
0
;
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szCounterName
=
(
char
*
)
"counter"
;
e
.
szCounterName
=
(
char
*
)
"counter"
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
"
\\\\
machine
\\
object(parent/instance#1)
\\
counter"
),
ok
(
!
strcmp
(
buffer
,
"
\\\\
machine
\\
object(parent/instance#1)
\\
counter"
),
"expected
\"\\\\
machine
\\
object(parent/instance#1)
\\
counter
\"
got %s
\n
"
,
buffer
);
"expected
\"\\\\
machine
\\
object(parent/instance#1)
\\
counter
\"
got %s
\n
"
,
buffer
);
...
@@ -925,7 +925,7 @@ static void test_PdhMakeCounterPathA(void)
...
@@ -925,7 +925,7 @@ static void test_PdhMakeCounterPathA(void)
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szParentInstance
=
NULL
;
e
.
szParentInstance
=
NULL
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
"
\\\\
machine
\\
object(instance#1)
\\
counter"
),
ok
(
!
strcmp
(
buffer
,
"
\\\\
machine
\\
object(instance#1)
\\
counter"
),
"expected
\"\\\\
machine
\\
object(instance#1)
\\
counter
\"
got %s
\n
"
,
buffer
);
"expected
\"\\\\
machine
\\
object(instance#1)
\\
counter
\"
got %s
\n
"
,
buffer
);
...
@@ -933,7 +933,7 @@ static void test_PdhMakeCounterPathA(void)
...
@@ -933,7 +933,7 @@ static void test_PdhMakeCounterPathA(void)
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szInstanceName
=
NULL
;
e
.
szInstanceName
=
NULL
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
"
\\\\
machine
\\
object
\\
counter"
),
ok
(
!
strcmp
(
buffer
,
"
\\\\
machine
\\
object
\\
counter"
),
"expected
\"\\\\
machine
\\
object
\\
counter
\"
got %s
\n
"
,
buffer
);
"expected
\"\\\\
machine
\\
object
\\
counter
\"
got %s
\n
"
,
buffer
);
...
@@ -941,7 +941,7 @@ static void test_PdhMakeCounterPathA(void)
...
@@ -941,7 +941,7 @@ static void test_PdhMakeCounterPathA(void)
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szMachineName
=
NULL
;
e
.
szMachineName
=
NULL
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
ok
(
!
strcmp
(
buffer
,
"
\\
object
\\
counter"
),
ok
(
!
strcmp
(
buffer
,
"
\\
object
\\
counter"
),
"expected
\"\\
object
\\
counter
\"
got %s
\n
"
,
buffer
);
"expected
\"\\
object
\\
counter
\"
got %s
\n
"
,
buffer
);
...
@@ -949,7 +949,7 @@ static void test_PdhMakeCounterPathA(void)
...
@@ -949,7 +949,7 @@ static void test_PdhMakeCounterPathA(void)
buflen
=
sizeof
(
buffer
);
buflen
=
sizeof
(
buffer
);
e
.
szObjectName
=
NULL
;
e
.
szObjectName
=
NULL
;
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ret
=
PdhMakeCounterPathA
(
&
e
,
buffer
,
&
buflen
,
0
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08x
\n
"
,
ret
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
,
"PdhMakeCounterPathA failed 0x%08
l
x
\n
"
,
ret
);
}
}
static
void
test_PdhGetDllVersion
(
void
)
static
void
test_PdhGetDllVersion
(
void
)
...
@@ -960,17 +960,17 @@ static void test_PdhGetDllVersion(void)
...
@@ -960,17 +960,17 @@ static void test_PdhGetDllVersion(void)
ret
=
PdhGetDllVersion
(
NULL
);
ret
=
PdhGetDllVersion
(
NULL
);
ok
(
ret
==
PDH_INVALID_ARGUMENT
||
ok
(
ret
==
PDH_INVALID_ARGUMENT
||
broken
(
ret
==
ERROR_SUCCESS
),
/* Vista+ */
broken
(
ret
==
ERROR_SUCCESS
),
/* Vista+ */
"Expected PdhGetDllVersion to return PDH_INVALID_ARGUMENT, got %d
\n
"
,
ret
);
"Expected PdhGetDllVersion to return PDH_INVALID_ARGUMENT, got %
l
d
\n
"
,
ret
);
ret
=
PdhGetDllVersion
(
&
version
);
ret
=
PdhGetDllVersion
(
&
version
);
ok
(
ret
==
ERROR_SUCCESS
,
ok
(
ret
==
ERROR_SUCCESS
,
"Expected PdhGetDllVersion to return ERROR_SUCCESS, got %d
\n
"
,
ret
);
"Expected PdhGetDllVersion to return ERROR_SUCCESS, got %
l
d
\n
"
,
ret
);
if
(
ret
==
ERROR_SUCCESS
)
if
(
ret
==
ERROR_SUCCESS
)
{
{
ok
(
version
==
PDH_CVERSION_WIN50
||
ok
(
version
==
PDH_CVERSION_WIN50
||
version
==
PDH_VERSION
,
version
==
PDH_VERSION
,
"Expected version number to be PDH_CVERSION_WIN50 or PDH_VERSION, got %u
\n
"
,
version
);
"Expected version number to be PDH_CVERSION_WIN50 or PDH_VERSION, got %
l
u
\n
"
,
version
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment