diff --git a/api/logger.c b/api/logger.c index a4400b9..b314f9c 100644 --- a/api/logger.c +++ b/api/logger.c @@ -5,11 +5,12 @@ #include "pch.h" -static VOID CALLBACK +static BOOL CALLBACK NopLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine) { UNREFERENCED_PARAMETER(Level); UNREFERENCED_PARAMETER(LogLine); + return TRUE; } WINTUN_LOGGER_FUNC Logger = NopLogger; diff --git a/api/logger.h b/api/logger.h index e7e3d35..64cbef3 100644 --- a/api/logger.h +++ b/api/logger.h @@ -14,7 +14,7 @@ typedef enum _WINTUN_LOGGER_LEVEL WINTUN_LOG_ERR } WINTUN_LOGGER_LEVEL; -typedef VOID(CALLBACK *WINTUN_LOGGER_FUNC)(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Message); +typedef BOOL(CALLBACK *WINTUN_LOGGER_FUNC)(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Message); extern WINTUN_LOGGER_FUNC Logger; diff --git a/api/rundll32.c b/api/rundll32.c index 3925ad1..ed1d9e1 100644 --- a/api/rundll32.c +++ b/api/rundll32.c @@ -7,7 +7,7 @@ #if defined(_M_AMD64) || defined(_M_ARM64) -static VOID CALLBACK +static BOOL CALLBACK ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_ const WCHAR *LogLine) { const WCHAR *Template; @@ -23,9 +23,10 @@ ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_ const WCHAR *LogLine) Template = L"[!] %s\n"; break; default: - return; + return FALSE; } fwprintf(stderr, Template, LogLine); + return TRUE; } static BOOL ElevateToSystem(VOID)