mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 09:08:31 +00:00
[ADVAPI32]
- Katayama Hirofumi: Use a real computer name instead of an empty string when reporting events in ReportEventA and W. See issue #5358 for more details. svn path=/trunk/; revision=47112
This commit is contained in:
parent
50367b3dac
commit
c47421927e
1 changed files with 10 additions and 4 deletions
|
@ -945,6 +945,8 @@ ReportEventA(IN HANDLE hEventLog,
|
||||||
ANSI_STRING *Strings;
|
ANSI_STRING *Strings;
|
||||||
ANSI_STRING ComputerName;
|
ANSI_STRING ComputerName;
|
||||||
WORD i;
|
WORD i;
|
||||||
|
CHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
|
||||||
|
DWORD dwSize;
|
||||||
|
|
||||||
TRACE("%p, %u, %u, %lu, %p, %u, %lu, %p, %p\n",
|
TRACE("%p, %u, %u, %lu, %p, %u, %lu, %p, %p\n",
|
||||||
hEventLog, wType, wCategory, dwEventID, lpUserSid,
|
hEventLog, wType, wCategory, dwEventID, lpUserSid,
|
||||||
|
@ -962,8 +964,9 @@ ReportEventA(IN HANDLE hEventLog,
|
||||||
for (i = 0; i < wNumStrings; i++)
|
for (i = 0; i < wNumStrings; i++)
|
||||||
RtlInitAnsiString(&Strings[i], lpStrings[i]);
|
RtlInitAnsiString(&Strings[i], lpStrings[i]);
|
||||||
|
|
||||||
/*FIXME: ComputerName */
|
dwSize = MAX_COMPUTERNAME_LENGTH + 1;
|
||||||
RtlInitAnsiString(&ComputerName, "");
|
GetComputerNameA(szComputerName, &dwSize);
|
||||||
|
RtlInitAnsiString(&ComputerName, szComputerName);
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
@ -1029,6 +1032,8 @@ ReportEventW(IN HANDLE hEventLog,
|
||||||
UNICODE_STRING *Strings;
|
UNICODE_STRING *Strings;
|
||||||
UNICODE_STRING ComputerName;
|
UNICODE_STRING ComputerName;
|
||||||
WORD i;
|
WORD i;
|
||||||
|
WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
|
||||||
|
DWORD dwSize;
|
||||||
|
|
||||||
TRACE("%p, %u, %u, %lu, %p, %u, %lu, %p, %p\n",
|
TRACE("%p, %u, %u, %lu, %p, %u, %lu, %p, %p\n",
|
||||||
hEventLog, wType, wCategory, dwEventID, lpUserSid,
|
hEventLog, wType, wCategory, dwEventID, lpUserSid,
|
||||||
|
@ -1046,8 +1051,9 @@ ReportEventW(IN HANDLE hEventLog,
|
||||||
for (i = 0; i < wNumStrings; i++)
|
for (i = 0; i < wNumStrings; i++)
|
||||||
RtlInitUnicodeString(&Strings[i], lpStrings[i]);
|
RtlInitUnicodeString(&Strings[i], lpStrings[i]);
|
||||||
|
|
||||||
/*FIXME: ComputerName */
|
dwSize = MAX_COMPUTERNAME_LENGTH + 1;
|
||||||
RtlInitUnicodeString(&ComputerName, L"");
|
GetComputerNameW(szComputerName, &dwSize);
|
||||||
|
RtlInitUnicodeString(&ComputerName, szComputerName);
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue