Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
2ea3dc43
Commit
2ea3dc43
authored
21 years ago
by
Mike Hearn
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented ReportEventA/W.
parent
4f21b3cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/advapi32/eventlog.c
+53
-5
53 additions, 5 deletions
dlls/advapi32/eventlog.c
with
53 additions
and
5 deletions
dlls/advapi32/eventlog.c
+
53
−
5
View file @
2ea3dc43
/*
* Win32 advapi functions
*
* Copyright 1995 Sven Verdoolaege, 1998 Juergen Schmied
* Copyright 1995 Sven Verdoolaege
* Copyright 1998 Juergen Schmied
* Copyright 2003 Mike Hearn
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -29,6 +31,7 @@
#include
"wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
advapi
);
WINE_DECLARE_DEBUG_CHANNEL
(
eventlog
);
/******************************************************************************
* BackupEventLogA [ADVAPI32.@]
...
...
@@ -257,8 +260,28 @@ RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
BOOL
WINAPI
ReportEventA
(
HANDLE
hEventLog
,
WORD
wType
,
WORD
wCategory
,
DWORD
dwEventID
,
PSID
lpUserSid
,
WORD
wNumStrings
,
DWORD
dwDataSize
,
LPCSTR
*
lpStrings
,
LPVOID
lpRawData
)
{
FIXME
(
"stub
\n
"
);
return
TRUE
;
LPCWSTR
*
wideStrArray
;
UNICODE_STRING
str
;
int
i
;
BOOL
ret
;
if
(
wNumStrings
==
0
)
return
TRUE
;
if
(
!
lpStrings
)
return
TRUE
;
wideStrArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPCWSTR
)
*
wNumStrings
);
for
(
i
=
0
;
i
<
wNumStrings
;
i
++
)
{
RtlCreateUnicodeStringFromAsciiz
(
&
str
,
lpStrings
[
i
]);
wideStrArray
[
i
]
=
str
.
Buffer
;
}
ret
=
ReportEventW
(
hEventLog
,
wType
,
wCategory
,
dwEventID
,
lpUserSid
,
wNumStrings
,
dwDataSize
,
wideStrArray
,
lpRawData
);
for
(
i
=
0
;
i
<
wNumStrings
;
i
++
)
{
if
(
wideStrArray
[
i
])
HeapFree
(
GetProcessHeap
(),
0
,
(
LPSTR
)
wideStrArray
[
i
]
);
}
HeapFree
(
GetProcessHeap
(),
0
,
wideStrArray
);
return
ret
;
}
/******************************************************************************
...
...
@@ -280,6 +303,31 @@ ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
DWORD
dwEventID
,
PSID
lpUserSid
,
WORD
wNumStrings
,
DWORD
dwDataSize
,
LPCWSTR
*
lpStrings
,
LPVOID
lpRawData
)
{
FIXME
(
"stub
\n
"
);
return
TRUE
;
int
i
;
/* partial stub */
if
(
wNumStrings
==
0
)
return
TRUE
;
if
(
!
lpStrings
)
return
TRUE
;
for
(
i
=
0
;
i
<
wNumStrings
;
i
++
)
{
switch
(
wType
)
{
case
EVENTLOG_SUCCESS
:
TRACE_
(
eventlog
)(
"%s
\n
"
,
debugstr_w
(
lpStrings
[
i
]));
break
;
case
EVENTLOG_ERROR_TYPE
:
ERR_
(
eventlog
)(
"%s
\n
"
,
debugstr_w
(
lpStrings
[
i
]));
break
;
case
EVENTLOG_WARNING_TYPE
:
WARN_
(
eventlog
)(
"%s
\n
"
,
debugstr_w
(
lpStrings
[
i
]));
break
;
default:
TRACE_
(
eventlog
)(
"%s
\n
"
,
debugstr_w
(
lpStrings
[
i
]));
break
;
}
}
return
TRUE
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment