aboutsummaryrefslogtreecommitdiffstats
path: root/api/logger.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-17 15:11:34 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:51:01 +0100
commit449876fdfd0c70e2d822e0576cec650a22704d91 (patch)
tree8a033361260e3524a44c3cbeb9674eee7d8807db /api/logger.h
parentapi: fix grammar (diff)
downloadwintun-449876fdfd0c70e2d822e0576cec650a22704d91.tar.xz
wintun-449876fdfd0c70e2d822e0576cec650a22704d91.zip
api: introduce wintun.h
The SDK header for deployment containing datatype and function declarations for use by C/C++ clients. As we shall not distribute MSVC wintun.lib files, making clients need to use GetProcAddress(), this file contains function type declarations rather then __declspec(dllimport) function declarations. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/logger.h')
-rw-r--r--api/logger.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/api/logger.h b/api/logger.h
index 64cbef3..76d98f8 100644
--- a/api/logger.h
+++ b/api/logger.h
@@ -5,20 +5,14 @@
#pragma once
-#include <Windows.h>
-
-typedef enum _WINTUN_LOGGER_LEVEL
-{
- WINTUN_LOG_INFO = 0,
- WINTUN_LOG_WARN,
- WINTUN_LOG_ERR
-} WINTUN_LOGGER_LEVEL;
-
-typedef BOOL(CALLBACK *WINTUN_LOGGER_FUNC)(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Message);
+#include "wintun.h"
extern WINTUN_LOGGER_FUNC Logger;
-VOID WINAPI
+/**
+ * @copydoc WINTUN_SET_LOGGER_FUNC
+ */
+void WINAPI
WintunSetLogger(_In_ WINTUN_LOGGER_FUNC NewLogger);
_Post_equals_last_error_ DWORD