wevtapi: Add EvtGetChannelConfigProperty(EvtChannelLoggingConfigLogFilePath) stub implementation.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2021-02-03 11:11:21 +03:00 committed by Alexandre Julliard
parent bdba6037d0
commit b7e8defd64
2 changed files with 56 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;