[PATCH 4/5] wevtapi: Add EvtGetChannelConfigProperty(EvtChannelLoggingConfigLogFilePath) stub implementation.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/wevtapi/main.c | 27 +++++++++++++++++++++++++++ include/winevt.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/dlls/wevtapi/main.c b/dlls/wevtapi/main.c index 220987650a2..9cac2a16949 100644 --- a/dlls/wevtapi/main.c +++ b/dlls/wevtapi/main.c @@ -1,6 +1,7 @@ /* * Copyright 2012 Austin English * Copyright 2012 André Hentschel + * Copyright 2021 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,6 +20,8 @@ #include <stdarg.h> +#define NONAMELESSUNION + #include "windef.h" #include "winbase.h" #include "winevt.h" @@ -26,6 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(wevtapi); +static const WCHAR log_pathW[] = L"C:\\windows\\temp\\evt.log"; + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); @@ -63,6 +68,28 @@ BOOL WINAPI EvtGetChannelConfigProperty(EVT_HANDLE ChannelConfig, { FIXME("(%p %i %u %u %p %p) stub\n", ChannelConfig, PropertyId, Flags, PropertyValueBufferSize, PropertyValueBuffer, PropertyValueBufferUsed); + + switch (PropertyId) + { + case EvtChannelLoggingConfigLogFilePath: + *PropertyValueBufferUsed = sizeof(log_pathW) + sizeof(EVT_VARIANT); + + if (PropertyValueBufferSize < sizeof(log_pathW) + sizeof(EVT_VARIANT) || !PropertyValueBuffer) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return FALSE; + } + + PropertyValueBuffer->u.StringVal = (LPWSTR)(PropertyValueBuffer + 1); + wcscpy((LPWSTR)PropertyValueBuffer->u.StringVal, log_pathW); + PropertyValueBuffer->Type = EvtVarTypeString; + return TRUE; + + default: + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + break; + } + return FALSE; } diff --git a/include/winevt.h b/include/winevt.h index a148dcbb094..a37cdb7297f 100644 --- a/include/winevt.h +++ b/include/winevt.h @@ -62,6 +62,36 @@ typedef enum _EVT_SUBSCRIBE_NOTIFY_ACTION { EvtSubscribeActionDeliver } EVT_SUBSCRIBE_NOTIFY_ACTION; +typedef enum _EVT_VARIANT_TYPE { + EvtVarTypeNull, + EvtVarTypeString, + EvtVarTypeAnsiString, + EvtVarTypeSByte, + EvtVarTypeByte, + EvtVarTypeInt16, + EvtVarTypeUInt16, + EvtVarTypeInt32, + EvtVarTypeUInt32, + EvtVarTypeInt64, + EvtVarTypeUInt64, + EvtVarTypeSingle, + EvtVarTypeDouble, + EvtVarTypeBoolean, + EvtVarTypeBinary, + EvtVarTypeGuid, + EvtVarTypeSizeT, + EvtVarTypeFileTime, + EvtVarTypeSysTime, + EvtVarTypeSid, + EvtVarTypeHexInt32, + EvtVarTypeHexInt64, + EvtVarTypeEvtHandle = 32, + EvtVarTypeEvtXml = 35 +} EVT_VARIANT_TYPE; + +#define EVT_VARIANT_TYPE_MASK 0x7f +#define EVT_VARIANT_TYPE_ARRAY 128 + typedef struct _EVT_VARIANT { union { BOOL BooleanVal; -- 2.29.2
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=84831 Your paranoid android. === debiant (build log) === error: patch failed: dlls/wevtapi/main.c:1 Task: Patch failed to apply === debiant (build log) === error: patch failed: dlls/wevtapi/main.c:1 Task: Patch failed to apply
Marvin <testbot(a)winehq.org> wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=84831
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/wevtapi/main.c:1 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/wevtapi/main.c:1 Task: Patch failed to apply
It seems that something went wrong, and testbot failed to figure out a proper sequence from the submitted patches. -- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Marvin