From 9e817f8f8b8a710c92b66f5c791f667937a9121f Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 31 Oct 2019 08:58:13 -0500 Subject: [PATCH] ntdll: Add missing spec file entry for EtwEventWriteString. Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/advapi32/tests/eventlog.c | 9 +++++++++ dlls/ntdll/ntdll.spec | 1 + include/evntprov.h | 1 + 3 files changed, 11 insertions(+) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index f12a6a157bd..6722ea7d622 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -37,6 +37,7 @@ static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD); static ULONG (WINAPI *pEventRegister)(const GUID *,PENABLECALLBACK,void *,REGHANDLE *); static ULONG (WINAPI *pEventUnregister)(REGHANDLE); +static ULONG (WINAPI *pEventWriteString)(REGHANDLE,UCHAR,ULONGLONG,const WCHAR *); static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD); static BOOL (WINAPI *pWow64DisableWow64FsRedirection)(PVOID *); @@ -49,6 +50,7 @@ static void init_function_pointers(void) pCreateWellKnownSid = (void*)GetProcAddress(hadvapi32, "CreateWellKnownSid"); pGetEventLogInformation = (void*)GetProcAddress(hadvapi32, "GetEventLogInformation"); + pEventWriteString = (void*)GetProcAddress(hadvapi32, "EventWriteString"); pEventRegister = (void*)GetProcAddress(hadvapi32, "EventRegister"); pEventUnregister = (void*)GetProcAddress(hadvapi32, "EventUnregister"); @@ -1153,6 +1155,7 @@ static void cleanup_eventlog(void) static void test_trace_event_params(void) { + static const WCHAR emptyW[] = {0}; static const GUID test_guid = {0x57696E65, 0x0000, 0x0000, {0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01}}; REGHANDLE reg_handle; @@ -1173,6 +1176,12 @@ static void test_trace_event_params(void) uret = pEventRegister(&test_guid, NULL, NULL, ®_handle); ok(uret == ERROR_SUCCESS, "EventRegister gave wrong error: %#x\n", uret); + uret = pEventWriteString(0, 0, 0, emptyW); + todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventWriteString gave wrong error: %#x\n", uret); + + uret = pEventWriteString(reg_handle, 0, 0, NULL); + todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventWriteString gave wrong error: %#x\n", uret); + uret = pEventUnregister(0); todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventUnregister gave wrong error: %#x\n", uret); diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 06811edf018..a42b4fc2482 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -52,6 +52,7 @@ @ stdcall EtwEventSetInformation(int64 long ptr long) @ stdcall EtwEventUnregister(int64) @ stdcall EtwEventWrite(int64 ptr long ptr) +@ stdcall EtwEventWriteString(int64 long int64 ptr) @ stdcall EtwEventWriteTransfer(int64 ptr ptr ptr long ptr) @ stdcall EtwGetTraceEnableFlags(int64) @ stdcall EtwGetTraceEnableLevel(int64) diff --git a/include/evntprov.h b/include/evntprov.h index a49fa79d9ad..a89c65fd4b0 100644 --- a/include/evntprov.h +++ b/include/evntprov.h @@ -73,6 +73,7 @@ ULONG WINAPI EventRegister(LPCGUID,PENABLECALLBACK,PVOID,PREGHANDLE); ULONG WINAPI EventSetInformation(REGHANDLE, EVENT_INFO_CLASS, PVOID, ULONG); ULONG WINAPI EventUnregister(REGHANDLE); ULONG WINAPI EventWrite(REGHANDLE,PCEVENT_DESCRIPTOR,ULONG,PEVENT_DATA_DESCRIPTOR); +ULONG WINAPI EventWriteString(REGHANDLE,UCHAR,ULONGLONG,const WCHAR *); ULONG WINAPI EventWriteTransfer(REGHANDLE,PCEVENT_DESCRIPTOR,LPCGUID,LPCGUID,ULONG,PEVENT_DATA_DESCRIPTOR); #ifdef __cplusplus