Dmitry Timoshkov : wevtapi: Add EvtGetChannelConfigProperty(EvtChannelLoggingConfigLogFilePath) stub implementation.
Alexandre Julliard
julliard at winehq.org
Wed Feb 3 15:39:28 CST 2021
Module: wine
Branch: master
Commit: b7e8defd64bc6a28b5dd70f47eb865293d58554c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b7e8defd64bc6a28b5dd70f47eb865293d58554c
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Wed Feb 3 11:11:21 2021 +0300
wevtapi: Add EvtGetChannelConfigProperty(EvtChannelLoggingConfigLogFilePath) stub implementation.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wevtapi/main.c | 26 ++++++++++++++++++++++++++
include/winevt.h | 30 ++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/dlls/wevtapi/main.c b/dlls/wevtapi/main.c
index 220987650a2..9bd70a4f6ee 100644
--- a/dlls/wevtapi/main.c
+++ b/dlls/wevtapi/main.c
@@ -19,6 +19,8 @@
#include <stdarg.h>
+#define NONAMELESSUNION
+
#include "windef.h"
#include "winbase.h"
#include "winevt.h"
@@ -26,6 +28,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 +67,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;
More information about the wine-cvs
mailing list