aboutsummaryrefslogtreecommitdiffstats
path: root/api/wintun.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-19 22:23:09 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:51:01 +0100
commitfaf7d3771c9bd7b8b9a3ee20ceed2a432542c318 (patch)
treebad93f3e3406a5b57b51d9a2b61133e9f9dd49bd /api/wintun.h
parentapi: installer: switch from MSM to ZIP distribution (diff)
downloadwintun-faf7d3771c9bd7b8b9a3ee20ceed2a432542c318.tar.xz
wintun-faf7d3771c9bd7b8b9a3ee20ceed2a432542c318.zip
api: connect rundll32 child with parent using stdout and stderr
The WintunCreateAdapter()+CreateAdapter() and WintunDeleteAdapter()+ DeleteAdapter() communicate using Unicode anonymous pipes now. This allows the WintunCreateAdapter() to exactly determine the adapter CreateAdapter() just created by its GUID rather than its name - avoiding the possible ambiguity caused by same-adapter-name ordinal suffixes. This also allows exact retrieval of the result code and pending reboot flag from the rundll32 child process. Furthermore, CreateAdapter() and DeleteAdapter() are now available in _DEBUG for all platforms to allow testing. It took a #pragma comment( linker, "/EXPORT") trick to stop compiler from decorating function names and exporting as _CreateAdapter@16() and _DeleteAdapter@16() in x86. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/wintun.h')
-rw-r--r--api/wintun.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/wintun.h b/api/wintun.h
index 0917a6c..dadac10 100644
--- a/api/wintun.h
+++ b/api/wintun.h
@@ -206,6 +206,8 @@ typedef BOOL(CALLBACK *WINTUN_LOGGER_FUNC)(_In_ WINTUN_LOGGER_LEVEL Level, _In_z
/**
* Sets logger callback function.
*
- * @param NewLogger Pointer to callback function to use as a new global logger.
+ * @param NewLogger Pointer to callback function to use as a new global logger. NewLogger may be called from various
+ * threads concurrently. Should the logging require serialization, you must handle serialization in
+ * NewLogger.
*/
typedef void(WINAPI *WINTUN_SET_LOGGER_FUNC)(_In_ WINTUN_LOGGER_FUNC NewLogger);