diff options
author | Simon Rozman <simon@rozman.si> | 2020-11-04 01:08:41 +0100 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2020-11-04 13:21:42 +0100 |
commit | 552821f59ab3d19d26fdfc4958c9fa2ee2e2e123 (patch) | |
tree | 1ee2138c0980540b7494e5b1457810471b4ccb28 /api/adapter.c | |
parent | api: use GetLastError() to report failures like standard Win32 (diff) | |
download | wintun-552821f59ab3d19d26fdfc4958c9fa2ee2e2e123.tar.xz wintun-552821f59ab3d19d26fdfc4958c9fa2ee2e2e123.zip |
api: translate NTSTATUS to Win32 error codes
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/adapter.c')
-rw-r--r-- | api/adapter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/adapter.c b/api/adapter.c index 24626e8..62ef05c 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -1128,7 +1128,7 @@ WintunGetVersion(void) if (Status == STATUS_INFO_LENGTH_MISMATCH) continue; LOG(WINTUN_LOG_ERR, L"Failed to enumerate drivers"); - SetLastError(ERROR_GEN_FAILURE); + SetLastError(RtlNtStatusToDosError(Status)); return 0; } DWORD LastError = ERROR_SUCCESS, Version = 0; |