mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 13:33:38 +00:00
advapi32: Print ReportEvent() messages one line at a time.
.NET Framework passes multiline backtraces to ReportEvent(), which get cut off when passed to debugstr_w().
This commit is contained in:
parent
3939eaf81a
commit
95258873a5
|
@ -642,20 +642,34 @@ BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dw
|
|||
|
||||
for (i = 0; i < wNumStrings; i++)
|
||||
{
|
||||
switch (wType)
|
||||
const WCHAR *line = lpStrings[i];
|
||||
|
||||
while (*line)
|
||||
{
|
||||
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;
|
||||
const WCHAR *next = wcschr( line, '\n' );
|
||||
|
||||
if (next)
|
||||
++next;
|
||||
else
|
||||
next = line + wcslen( line );
|
||||
|
||||
switch (wType)
|
||||
{
|
||||
case EVENTLOG_SUCCESS:
|
||||
TRACE_(eventlog)("%s\n", debugstr_wn(line, next - line));
|
||||
break;
|
||||
case EVENTLOG_ERROR_TYPE:
|
||||
ERR_(eventlog)("%s\n", debugstr_wn(line, next - line));
|
||||
break;
|
||||
case EVENTLOG_WARNING_TYPE:
|
||||
WARN_(eventlog)("%s\n", debugstr_wn(line, next - line));
|
||||
break;
|
||||
default:
|
||||
TRACE_(eventlog)("%s\n", debugstr_wn(line, next - line));
|
||||
break;
|
||||
}
|
||||
|
||||
line = next;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue