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
8cfbb177
Commit
8cfbb177
authored
Nov 22, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Nov 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Improve PerfSetCounterRefValue() stub.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eec443af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
perf.c
dlls/advapi32/tests/perf.c
+5
-5
main.c
dlls/kernelbase/main.c
+21
-3
No files found.
dlls/advapi32/tests/perf.c
View file @
8cfbb177
...
...
@@ -155,16 +155,16 @@ void test_provider_init(void)
ok
(
size
==
instance
->
dwSize
,
"Got unexpected size %u, instance->dwSize %u.
\n
"
,
size
,
instance
->
dwSize
);
ret
=
PerfSetCounterRefValue
(
prov
,
instance
,
1
,
&
counter1
);
todo_wine
ok
(
!
ret
,
"Got unexpected ret %u.
\n
"
,
ret
);
ok
(
!
ret
,
"Got unexpected ret %u.
\n
"
,
ret
);
ret
=
PerfSetCounterRefValue
(
prov
,
instance
,
2
,
&
counter2
);
todo_wine
ok
(
!
ret
,
"Got unexpected ret %u.
\n
"
,
ret
);
ok
(
!
ret
,
"Got unexpected ret %u.
\n
"
,
ret
);
ret
=
PerfSetCounterRefValue
(
prov
,
instance
,
0
,
&
counter2
);
todo_wine
ok
(
ret
==
ERROR_NOT_FOUND
,
"Got unexpected ret %u.
\n
"
,
ret
);
ok
(
ret
==
ERROR_NOT_FOUND
,
"Got unexpected ret %u.
\n
"
,
ret
);
todo_wine
ok
(
*
(
void
**
)(
instance
+
1
)
==
&
counter1
,
"Got unexpected counter value %p.
\n
"
,
ok
(
*
(
void
**
)(
instance
+
1
)
==
&
counter1
,
"Got unexpected counter value %p.
\n
"
,
*
(
void
**
)(
instance
+
1
));
todo_wine
ok
(
*
(
void
**
)((
BYTE
*
)
instance
+
sizeof
(
*
instance
)
+
sizeof
(
UINT64
))
==
&
counter2
,
ok
(
*
(
void
**
)((
BYTE
*
)
instance
+
sizeof
(
*
instance
)
+
sizeof
(
UINT64
))
==
&
counter2
,
"Got unexpected counter value %p.
\n
"
,
*
(
void
**
)(
instance
+
1
));
ret
=
PerfDeleteInstance
(
prov
,
instance
);
...
...
dlls/kernelbase/main.c
View file @
8cfbb177
...
...
@@ -312,11 +312,29 @@ ULONG WINAPI PerfSetCounterSetInfo( HANDLE handle, PERF_COUNTERSET_INFO *templat
/***********************************************************************
* PerfSetCounterRefValue (KERNELBASE.@)
*/
ULONG
WINAPI
PerfSetCounterRefValue
(
HANDLE
provider
,
P
PERF_COUNTERSET_INSTANCE
instance
,
ULONG
WINAPI
PerfSetCounterRefValue
(
HANDLE
provider
,
P
ERF_COUNTERSET_INSTANCE
*
instance
,
ULONG
counterid
,
void
*
address
)
{
FIXME
(
"%p %p %u %p: stub
\n
"
,
provider
,
instance
,
counterid
,
address
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
struct
perf_provider
*
prov
=
perf_provider_from_handle
(
provider
);
struct
counterset_template
*
template
;
struct
counterset_instance
*
inst
;
unsigned
int
i
;
FIXME
(
"provider %p, instance %p, counterid %u, address %p semi-stub.
\n
"
,
provider
,
instance
,
counterid
,
address
);
if
(
!
prov
||
!
instance
||
!
address
)
return
ERROR_INVALID_PARAMETER
;
inst
=
CONTAINING_RECORD
(
instance
,
struct
counterset_instance
,
instance
);
template
=
inst
->
template
;
for
(
i
=
0
;
i
<
template
->
counterset
.
NumCounters
;
++
i
)
if
(
template
->
counter
[
i
].
CounterId
==
counterid
)
break
;
if
(
i
==
template
->
counterset
.
NumCounters
)
return
ERROR_NOT_FOUND
;
*
(
void
**
)((
BYTE
*
)
&
inst
->
instance
+
sizeof
(
PERF_COUNTERSET_INSTANCE
)
+
template
->
counter
[
i
].
Offset
)
=
address
;
return
STATUS_SUCCESS
;
}
/***********************************************************************
...
...
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