mirror of
https://github.com/reactos/reactos.git
synced 2024-07-23 20:58:16 +00:00
Implement ElfrRegisterEventSourceA.
svn path=/trunk/; revision=45123
This commit is contained in:
parent
a811921d8e
commit
734debd8dc
|
@ -29,7 +29,6 @@ DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = RpcServerRegisterIf(eventlog_v0_0_s_ifspec, NULL, NULL);
|
Status = RpcServerRegisterIf(eventlog_v0_0_s_ifspec, NULL, NULL);
|
||||||
|
|
||||||
if (Status != RPC_S_OK)
|
if (Status != RPC_S_OK)
|
||||||
{
|
{
|
||||||
DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
|
DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
|
||||||
|
@ -37,7 +36,6 @@ DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE);
|
Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE);
|
||||||
|
|
||||||
if (Status != RPC_S_OK)
|
if (Status != RPC_S_OK)
|
||||||
{
|
{
|
||||||
DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
|
DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
|
||||||
|
@ -533,8 +531,48 @@ NTSTATUS ElfrRegisterEventSourceA(
|
||||||
DWORD MinorVersion,
|
DWORD MinorVersion,
|
||||||
IELF_HANDLE *LogHandle)
|
IELF_HANDLE *LogHandle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNICODE_STRING UNCServerNameW = { 0, 0, NULL };
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
UNICODE_STRING ModuleNameW = { 0, 0, NULL };
|
||||||
|
|
||||||
|
if (UNCServerName &&
|
||||||
|
!RtlCreateUnicodeStringFromAsciiz(&UNCServerNameW, UNCServerName))
|
||||||
|
{
|
||||||
|
return STATUS_NO_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ModuleName &&
|
||||||
|
!RtlAnsiStringToUnicodeString(&ModuleNameW, (PANSI_STRING)ModuleName, TRUE))
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&UNCServerNameW);
|
||||||
|
return STATUS_NO_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RegModuleName must be an empty string */
|
||||||
|
if (RegModuleName->Length > 0)
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&UNCServerNameW);
|
||||||
|
RtlFreeUnicodeString(&ModuleNameW);
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((MajorVersion != 1) || (MinorVersion != 1))
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&UNCServerNameW);
|
||||||
|
RtlFreeUnicodeString(&ModuleNameW);
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*FIXME: UNCServerName must specify the server or empty for local */
|
||||||
|
|
||||||
|
/*FIXME: Must verify that caller has write access */
|
||||||
|
|
||||||
|
*LogHandle = ElfCreateEventLogHandle(ModuleNameW.Buffer,
|
||||||
|
TRUE);
|
||||||
|
|
||||||
|
RtlFreeUnicodeString(&UNCServerNameW);
|
||||||
|
RtlFreeUnicodeString(&ModuleNameW);
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue