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
071292be
Commit
071292be
authored
Jun 22, 2021
by
Francois Gouget
Committed by
Alexandre Julliard
Jun 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
6799667b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
pdh_main.c
dlls/pdh/pdh_main.c
+4
-2
pdh.c
dlls/pdh/tests/pdh.c
+4
-2
No files found.
dlls/pdh/pdh_main.c
View file @
071292be
...
...
@@ -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
);
}
...
...
dlls/pdh/tests/pdh.c
View file @
071292be
...
...
@@ -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
);
...
...
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