For some reason testbot chokes on UTF-8 character in Copyright while applying the patch, this version of the patch doesn't change the Copyright header.
Signed-off-by: Dmitry Timoshkov dmitry@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 f7aa7a2a593..1e06a2089e9 100644 --- a/dlls/wevtapi/main.c +++ b/dlls/wevtapi/main.c @@ -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 a37954f2f94..c41ca7b5ffa 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;