mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 12:53:40 +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++)
|
for (i = 0; i < wNumStrings; i++)
|
||||||
{
|
{
|
||||||
switch (wType)
|
const WCHAR *line = lpStrings[i];
|
||||||
|
|
||||||
|
while (*line)
|
||||||
{
|
{
|
||||||
case EVENTLOG_SUCCESS:
|
const WCHAR *next = wcschr( line, '\n' );
|
||||||
TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
|
|
||||||
break;
|
if (next)
|
||||||
case EVENTLOG_ERROR_TYPE:
|
++next;
|
||||||
ERR_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
|
else
|
||||||
break;
|
next = line + wcslen( line );
|
||||||
case EVENTLOG_WARNING_TYPE:
|
|
||||||
WARN_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
|
switch (wType)
|
||||||
break;
|
{
|
||||||
default:
|
case EVENTLOG_SUCCESS:
|
||||||
TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
|
TRACE_(eventlog)("%s\n", debugstr_wn(line, next - line));
|
||||||
break;
|
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;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue