api: rundll32: make empty string if no instance id
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
6cf6f42f07
commit
42030404e0
@ -86,7 +86,7 @@ VOID __stdcall CreateAdapter(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int
|
|||||||
WINTUN_ADAPTER *Adapter = WintunCreateAdapter(Argv[2], Argv[3], Argc > 4 ? &RequestedGUID : NULL, &RebootRequired);
|
WINTUN_ADAPTER *Adapter = WintunCreateAdapter(Argv[2], Argv[3], Argc > 4 ? &RequestedGUID : NULL, &RebootRequired);
|
||||||
DWORD LastError = Adapter ? ERROR_SUCCESS : GetLastError();
|
DWORD LastError = Adapter ? ERROR_SUCCESS : GetLastError();
|
||||||
WriteFormatted(
|
WriteFormatted(
|
||||||
STD_OUTPUT_HANDLE, L"%1!X! %2!s! %3!X!", LastError, Adapter ? Adapter->DevInstanceID : L"", RebootRequired);
|
STD_OUTPUT_HANDLE, L"%1!X! %2!s! %3!X!", LastError, Adapter ? Adapter->DevInstanceID : L"\"\"", RebootRequired);
|
||||||
if (Adapter)
|
if (Adapter)
|
||||||
WintunFreeAdapter(Adapter);
|
WintunFreeAdapter(Adapter);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user