Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
364d654b
Commit
364d654b
authored
Oct 31, 2019
by
Andrew Eikum
Committed by
Alexandre Julliard
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Add EventRegister and EventUnregister tests.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
81836648
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
eventlog.c
dlls/advapi32/tests/eventlog.c
+35
-0
misc.c
dlls/ntdll/misc.c
+2
-0
No files found.
dlls/advapi32/tests/eventlog.c
View file @
364d654b
...
...
@@ -28,12 +28,15 @@
#include "winreg.h"
#include "sddl.h"
#include "wmistr.h"
#include "evntprov.h"
#include "evntrace.h"
#include "wine/test.h"
static
BOOL
(
WINAPI
*
pCreateWellKnownSid
)(
WELL_KNOWN_SID_TYPE
,
PSID
,
PSID
,
DWORD
*
);
static
BOOL
(
WINAPI
*
pGetEventLogInformation
)(
HANDLE
,
DWORD
,
LPVOID
,
DWORD
,
LPDWORD
);
static
ULONG
(
WINAPI
*
pEventRegister
)(
const
GUID
*
,
PENABLECALLBACK
,
void
*
,
REGHANDLE
*
);
static
ULONG
(
WINAPI
*
pEventUnregister
)(
REGHANDLE
);
static
BOOL
(
WINAPI
*
pGetComputerNameExA
)(
COMPUTER_NAME_FORMAT
,
LPSTR
,
LPDWORD
);
static
BOOL
(
WINAPI
*
pWow64DisableWow64FsRedirection
)(
PVOID
*
);
...
...
@@ -46,6 +49,8 @@ static void init_function_pointers(void)
pCreateWellKnownSid
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CreateWellKnownSid"
);
pGetEventLogInformation
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"GetEventLogInformation"
);
pEventRegister
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"EventRegister"
);
pEventUnregister
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"EventUnregister"
);
pGetComputerNameExA
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetComputerNameExA"
);
pWow64DisableWow64FsRedirection
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"Wow64DisableWow64FsRedirection"
);
...
...
@@ -1146,6 +1151,35 @@ static void cleanup_eventlog(void)
ok
(
bret
,
"Expected MoveFileEx to succeed: %d
\n
"
,
GetLastError
());
}
static
void
test_trace_event_params
(
void
)
{
static
const
GUID
test_guid
=
{
0x57696E65
,
0x0000
,
0x0000
,
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
}};
REGHANDLE
reg_handle
;
ULONG
uret
;
if
(
!
pEventRegister
)
{
win_skip
(
"advapi32.EventRegister is missing, skipping trace event tests
\n
"
);
return
;
}
uret
=
pEventRegister
(
NULL
,
NULL
,
NULL
,
&
reg_handle
);
todo_wine
ok
(
uret
==
ERROR_INVALID_PARAMETER
,
"EventRegister gave wrong error: %#x
\n
"
,
uret
);
uret
=
pEventRegister
(
&
test_guid
,
NULL
,
NULL
,
NULL
);
ok
(
uret
==
ERROR_INVALID_PARAMETER
,
"EventRegister gave wrong error: %#x
\n
"
,
uret
);
uret
=
pEventRegister
(
&
test_guid
,
NULL
,
NULL
,
&
reg_handle
);
ok
(
uret
==
ERROR_SUCCESS
,
"EventRegister gave wrong error: %#x
\n
"
,
uret
);
uret
=
pEventUnregister
(
0
);
todo_wine
ok
(
uret
==
ERROR_INVALID_HANDLE
,
"EventUnregister gave wrong error: %#x
\n
"
,
uret
);
uret
=
pEventUnregister
(
reg_handle
);
ok
(
uret
==
ERROR_SUCCESS
,
"EventUnregister gave wrong error: %#x
\n
"
,
uret
);
}
static
void
test_start_trace
(
void
)
{
const
char
sessionname
[]
=
"wine"
;
...
...
@@ -1259,6 +1293,7 @@ START_TEST(eventlog)
test_openbackup
();
test_read
();
test_clear
();
test_trace_event_params
();
/* Functional tests */
if
(
create_new_eventlog
())
...
...
dlls/ntdll/misc.c
View file @
364d654b
...
...
@@ -403,6 +403,8 @@ ULONG WINAPI EtwEventRegister( LPCGUID provider, PENABLECALLBACK callback, PVOID
{
FIXME
(
"(%s, %p, %p, %p) stub.
\n
"
,
debugstr_guid
(
provider
),
callback
,
context
,
handle
);
if
(
!
handle
)
return
ERROR_INVALID_PARAMETER
;
*
handle
=
0xdeadbeef
;
return
ERROR_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