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
7cc43213
Commit
7cc43213
authored
Oct 28, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Add a stubbed GetEventLogInformation with input param checking.
parent
400d6216
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
2 deletions
+60
-2
advapi32.spec
dlls/advapi32/advapi32.spec
+1
-1
eventlog.c
dlls/advapi32/eventlog.c
+58
-0
eventlog.c
dlls/advapi32/tests/eventlog.c
+1
-1
No files found.
dlls/advapi32/advapi32.spec
View file @
7cc43213
...
...
@@ -236,7 +236,7 @@
@ stdcall GetCurrentHwProfileW(ptr)
@ stdcall GetEffectiveRightsFromAclA(ptr ptr ptr)
@ stdcall GetEffectiveRightsFromAclW(ptr ptr ptr)
# @ stub GetEventLogInformation
@ stdcall GetEventLogInformation(long long ptr long ptr)
@ stdcall GetExplicitEntriesFromAclA(ptr ptr ptr)
@ stdcall GetExplicitEntriesFromAclW(ptr ptr ptr)
@ stdcall GetFileSecurityA(str long ptr long ptr)
...
...
dlls/advapi32/eventlog.c
View file @
7cc43213
...
...
@@ -190,6 +190,64 @@ ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, T
}
/******************************************************************************
* GetEventLogInformation [ADVAPI32.@]
*
* Retrieve some information about an event log.
*
* PARAMS
* hEventLog [I] Handle to an open event log.
* dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
* lpBuffer [I/O] The buffer for the returned information
* cbBufSize [I] The size of the buffer
* pcbBytesNeeded [O] The needed bytes to hold the information
*
* RETURNS
* Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
* the needed buffer size.
* Failure: FALSE.
*/
BOOL
WINAPI
GetEventLogInformation
(
HANDLE
hEventLog
,
DWORD
dwInfoLevel
,
LPVOID
lpBuffer
,
DWORD
cbBufSize
,
LPDWORD
pcbBytesNeeded
)
{
EVENTLOG_FULL_INFORMATION
*
efi
;
FIXME
(
"(%p, %d, %p, %d, %p) stub
\n
"
,
hEventLog
,
dwInfoLevel
,
lpBuffer
,
cbBufSize
,
pcbBytesNeeded
);
if
(
dwInfoLevel
!=
EVENTLOG_FULL_INFO
)
{
SetLastError
(
ERROR_INVALID_LEVEL
);
return
FALSE
;
}
if
(
!
hEventLog
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
!
lpBuffer
||
!
pcbBytesNeeded
)
{
/* FIXME: This will be handled properly when eventlog is moved
* to a higher level
*/
SetLastError
(
RPC_X_NULL_REF_POINTER
);
return
FALSE
;
}
*
pcbBytesNeeded
=
sizeof
(
EVENTLOG_FULL_INFORMATION
);
if
(
cbBufSize
<
sizeof
(
EVENTLOG_FULL_INFORMATION
))
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
/* Pretend the log is not full */
efi
=
(
EVENTLOG_FULL_INFORMATION
*
)
lpBuffer
;
efi
->
dwFull
=
0
;
return
TRUE
;
}
/******************************************************************************
* GetNumberOfEventLogRecords [ADVAPI32.@]
*
* Retrieves the number of records in an event log.
...
...
dlls/advapi32/tests/eventlog.c
View file @
7cc43213
...
...
@@ -99,7 +99,7 @@ static void test_info(void)
if
(
!
pGetEventLogInformation
)
{
/* NT4 */
skip
(
"GetEventLogInformation is not available
\n
"
);
win_
skip
(
"GetEventLogInformation is not available
\n
"
);
return
;
}
SetLastError
(
0xdeadbeef
);
...
...
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