diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-03 12:27:42 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-03 12:27:42 +0100 |
commit | 7dede73406a970e910516ca9e5ea8a0f82945ae3 (patch) | |
tree | 6466c752da664bdc698d82c9d056d4aba725b52e /api/rundll32.c | |
parent | api: move _L macro where it belongs (diff) | |
download | wintun-7dede73406a970e910516ca9e5ea8a0f82945ae3.tar.xz wintun-7dede73406a970e910516ca9e5ea8a0f82945ae3.zip |
api: add pool/driver removal for uninstaller semantics
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'api/rundll32.c')
-rw-r--r-- | api/rundll32.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/api/rundll32.c b/api/rundll32.c index e41c2f1..bc07597 100644 --- a/api/rundll32.c +++ b/api/rundll32.c @@ -131,12 +131,19 @@ cleanup: Done(); } -VOID __stdcall DeleteDriver(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) +VOID __stdcall DeletePoolDriver(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) { # pragma EXPORT Init(); - WriteFormatted(STD_OUTPUT_HANDLE, L"%1!X!", WintunDeleteDriver()); + if (Argc < 2) + goto cleanup; + + BOOL RebootRequired; + WINTUN_STATUS Ret = WintunDeletePoolDriver(Argv[2], &RebootRequired); + WriteFormatted(STD_OUTPUT_HANDLE, L"%1!X! %2!X!", Ret, RebootRequired); + +cleanup: Done(); } #endif |