summaryrefslogtreecommitdiff
path: root/gpio/samples/simdevice/common.h
diff options
context:
space:
mode:
authorkarlf <[email protected]>2016-08-11 13:28:13 -0700
committerkarlf <[email protected]>2016-08-11 13:28:13 -0700
commit96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch)
treead5f3ede5cbcd6b598677ce41bcf8318471bdd92 /gpio/samples/simdevice/common.h
parent687b274aa38fd05c8c26e3068932121876d7f745 (diff)
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'gpio/samples/simdevice/common.h')
-rw-r--r--gpio/samples/simdevice/common.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/gpio/samples/simdevice/common.h b/gpio/samples/simdevice/common.h
index 315044c8..003fb418 100644
--- a/gpio/samples/simdevice/common.h
+++ b/gpio/samples/simdevice/common.h
@@ -23,14 +23,20 @@ Environment:
#pragma once
+#ifndef _KERNEL_MODE
+// This is a user-mode driver
+#include <windows.h>
+#else
+// This is a kernel-mode driver
#include <ntddk.h>
+#define NTSTRSAFE_LIB
+#include <ntstrsafe.h>
+#endif
+
#pragma warning(disable:4201) // disable nameless struct/union warnings
#include <wdf.h>
#pragma warning(default:4201)
-#define NTSTRSAFE_LIB
-#include <ntstrsafe.h>
-
#ifndef MAX_USHORT
#define MAX_USHORT ((USHORT)-1)
#endif