aboutsummaryrefslogtreecommitdiffstats
path: root/undocumented.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-30 21:39:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-03 10:53:11 +0000
commitb6cc08d5742551015d596802d9fc3b1b19d2b393 (patch)
tree50654e41514bfe5968b610f487b3b71513e931a4 /undocumented.h
parentClear NBLs on PnP notification (diff)
downloadwintun-b6cc08d5742551015d596802d9fc3b1b19d2b393.tar.xz
wintun-b6cc08d5742551015d596802d9fc3b1b19d2b393.zip
Force handles closed if required
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'undocumented.h')
-rw-r--r--undocumented.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/undocumented.h b/undocumented.h
new file mode 100644
index 0000000..7f7d225
--- /dev/null
+++ b/undocumented.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
+ */
+
+#pragma once
+
+#include <wdm.h>
+
+typedef enum { SystemExtendedHandleInformation = 0x40 } SYSTEM_INFORMATION_CLASS;
+
+typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX
+{
+ PVOID Object;
+ HANDLE UniqueProcessId;
+ HANDLE HandleValue;
+ ACCESS_MASK GrantedAccess;
+ USHORT CreatorBackTraceIndex;
+ USHORT ObjectTypeIndex;
+ ULONG HandleAttributes;
+ ULONG Reserved;
+} SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX;
+
+typedef struct _SYSTEM_HANDLE_INFORMATION_EX
+{
+ ULONG_PTR NumberOfHandles;
+ ULONG_PTR Reserved;
+ SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX Handles[ANYSIZE_ARRAY];
+} SYSTEM_HANDLE_INFORMATION_EX, *PSYSTEM_HANDLE_INFORMATION_EX;
+
+extern NTSTATUS ZwQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, ULONG *ReturnLength);