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
a5921e71
Commit
a5921e71
authored
Sep 12, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Add stub for PerfOpenQueryHandle().
parent
f8318158
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
1 deletion
+50
-1
advapi.c
dlls/advapi32/advapi.c
+10
-0
advapi32.spec
dlls/advapi32/advapi32.spec
+1
-1
perf.c
dlls/advapi32/tests/perf.c
+38
-0
perflib.h
include/perflib.h
+1
-0
No files found.
dlls/advapi32/advapi.c
View file @
a5921e71
...
@@ -321,3 +321,13 @@ ULONG WINAPI PerfCloseQueryHandle( HANDLE query )
...
@@ -321,3 +321,13 @@ ULONG WINAPI PerfCloseQueryHandle( HANDLE query )
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
ULONG
WINAPI
PerfOpenQueryHandle
(
const
WCHAR
*
machine
,
HANDLE
*
query
)
{
FIXME
(
"machine %s, query %p.
\n
"
,
debugstr_w
(
machine
),
query
);
if
(
!
query
)
return
ERROR_INVALID_PARAMETER
;
*
query
=
(
HANDLE
)
0xdeadbeef
;
return
ERROR_SUCCESS
;
}
dlls/advapi32/advapi32.spec
View file @
a5921e71
...
@@ -564,7 +564,7 @@
...
@@ -564,7 +564,7 @@
# @ stub PerfEnumerateCounterSetInstances
# @ stub PerfEnumerateCounterSetInstances
# @ stub PerfIncrementULongCounterValue
# @ stub PerfIncrementULongCounterValue
# @ stub PerfIncrementULongLongCounterValue
# @ stub PerfIncrementULongLongCounterValue
# @ stub PerfOpenQueryHandle
@ stdcall PerfOpenQueryHandle(wstr ptr)
# @ stub PerfQueryCounterData
# @ stub PerfQueryCounterData
# @ stub PerfQueryCounterInfo
# @ stub PerfQueryCounterInfo
# @ stub PerfQueryCounterSetRegistrationInfo
# @ stub PerfQueryCounterSetRegistrationInfo
...
...
dlls/advapi32/tests/perf.c
View file @
a5921e71
...
@@ -28,6 +28,21 @@
...
@@ -28,6 +28,21 @@
#include "wine/test.h"
#include "wine/test.h"
#define DEFINE_FUNCTION(name) static typeof(name) *p##name;
DEFINE_FUNCTION
(
PerfCloseQueryHandle
);
DEFINE_FUNCTION
(
PerfOpenQueryHandle
);
#undef DEFINE_FUNCTION
static
void
init_functions
(
void
)
{
HANDLE
hadvapi
=
GetModuleHandleA
(
"advapi32.dll"
);
#define GET_FUNCTION(name) p##name = (void *)GetProcAddress(hadvapi, #name)
GET_FUNCTION
(
PerfCloseQueryHandle
);
GET_FUNCTION
(
PerfOpenQueryHandle
);
#undef GET_FUNCTION
}
static
ULONG
WINAPI
test_provider_callback
(
ULONG
code
,
void
*
buffer
,
ULONG
size
)
static
ULONG
WINAPI
test_provider_callback
(
ULONG
code
,
void
*
buffer
,
ULONG
size
)
{
{
ok
(
0
,
"Provider callback called.
\n
"
);
ok
(
0
,
"Provider callback called.
\n
"
);
...
@@ -188,7 +203,30 @@ void test_provider_init(void)
...
@@ -188,7 +203,30 @@ void test_provider_init(void)
ok
(
!
ret
,
"Got unexpected ret %lu.
\n
"
,
ret
);
ok
(
!
ret
,
"Got unexpected ret %lu.
\n
"
,
ret
);
}
}
static
void
test_perf_counters
(
void
)
{
HANDLE
query
;
ULONG
ret
;
if
(
!
pPerfOpenQueryHandle
)
{
win_skip
(
"PerfOpenQueryHandle not found.
\n
"
);
return
;
}
ret
=
pPerfOpenQueryHandle
(
NULL
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got ret %lu.
\n
"
,
ret
);
ret
=
pPerfOpenQueryHandle
(
NULL
,
&
query
);
ok
(
!
ret
,
"got ret %lu.
\n
"
,
ret
);
ret
=
pPerfCloseQueryHandle
(
query
);
ok
(
!
ret
,
"got ret %lu.
\n
"
,
ret
);
}
START_TEST
(
perf
)
START_TEST
(
perf
)
{
{
init_functions
();
test_provider_init
();
test_provider_init
();
test_perf_counters
();
}
}
include/perflib.h
View file @
a5921e71
...
@@ -90,6 +90,7 @@ ULONG WINAPI PerfStartProviderEx(GUID *, PERF_PROVIDER_CONTEXT *, HANDLE *);
...
@@ -90,6 +90,7 @@ ULONG WINAPI PerfStartProviderEx(GUID *, PERF_PROVIDER_CONTEXT *, HANDLE *);
ULONG
WINAPI
PerfStopProvider
(
HANDLE
);
ULONG
WINAPI
PerfStopProvider
(
HANDLE
);
ULONG
WINAPI
PerfCloseQueryHandle
(
HANDLE
);
ULONG
WINAPI
PerfCloseQueryHandle
(
HANDLE
);
ULONG
WINAPI
PerfOpenQueryHandle
(
const
WCHAR
*
,
HANDLE
*
);
#ifdef __cplusplus
#ifdef __cplusplus
}
/* extern "C" */
}
/* extern "C" */
...
...
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