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
832b7f1e
Commit
832b7f1e
authored
May 15, 2021
by
Francois Gouget
Committed by
Alexandre Julliard
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Trace failures to open the event log.
Signed-off-by:
Francois Gouget
<
fgouget@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
59588b66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
eventlog.c
dlls/advapi32/tests/eventlog.c
+8
-1
No files found.
dlls/advapi32/tests/eventlog.c
View file @
832b7f1e
...
...
@@ -64,8 +64,10 @@ static BOOL create_backup(const char *filename)
HANDLE
handle
;
DWORD
rc
,
attribs
;
DeleteFileA
(
filename
);
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
ok
(
handle
!=
NULL
,
"OpenEventLogA(Application) failed : %d
\n
"
,
GetLastError
());
DeleteFileA
(
filename
);
rc
=
BackupEventLogA
(
handle
,
filename
);
if
(
!
rc
&&
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
)
{
...
...
@@ -160,6 +162,7 @@ static void test_info(void)
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
ok
(
handle
!=
NULL
,
"OpenEventLogA(Application) failed : %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetEventLogInformation
(
handle
,
EVENTLOG_FULL_INFO
,
NULL
,
0
,
NULL
);
...
...
@@ -216,6 +219,7 @@ static void test_count(void)
ok
(
count
==
0xdeadbeef
,
"Expected count to stay unchanged
\n
"
);
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
ok
(
handle
!=
NULL
,
"OpenEventLogA(Application) failed : %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
GetNumberOfEventLogRecords
(
handle
,
NULL
);
...
...
@@ -270,6 +274,7 @@ static void test_oldest(void)
ok
(
oldest
==
0xdeadbeef
,
"Expected oldest to stay unchanged
\n
"
);
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
ok
(
handle
!=
NULL
,
"OpenEventLogA(Application) failed : %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
GetOldestEventLogRecord
(
handle
,
NULL
);
...
...
@@ -322,6 +327,7 @@ static void test_backup(void)
ok
(
GetFileAttributesA
(
backup
)
==
INVALID_FILE_ATTRIBUTES
,
"Expected no backup file
\n
"
);
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
ok
(
handle
!=
NULL
,
"OpenEventLogA(Application) failed : %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
BackupEventLogA
(
handle
,
NULL
);
...
...
@@ -433,6 +439,7 @@ static void test_read(void)
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
ok
(
handle
!=
NULL
,
"OpenEventLogA(Application) failed : %d
\n
"
,
GetLastError
());
/* Show that we need the proper dwFlags with a (for the rest) proper call */
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
EVENTLOGRECORD
));
...
...
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