2020-07-03 12:26:06 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0
|
|
|
|
*
|
2021-01-30 16:45:26 +01:00
|
|
|
* Copyright (C) 2018-2021 WireGuard LLC. All Rights Reserved.
|
2020-07-03 12:26:06 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
2021-07-28 20:20:09 +02:00
|
|
|
#if defined(_M_IX86)
|
|
|
|
# define IMAGE_FILE_PROCESS IMAGE_FILE_MACHINE_I386
|
|
|
|
#elif defined(_M_AMD64)
|
|
|
|
# define IMAGE_FILE_PROCESS IMAGE_FILE_MACHINE_AMD64
|
|
|
|
#elif defined(_M_ARM)
|
|
|
|
# define IMAGE_FILE_PROCESS IMAGE_FILE_MACHINE_ARMNT
|
|
|
|
#elif defined(_M_ARM64)
|
|
|
|
# define IMAGE_FILE_PROCESS IMAGE_FILE_MACHINE_ARM64
|
2020-11-03 02:09:00 +01:00
|
|
|
#else
|
2021-07-28 20:20:09 +02:00
|
|
|
# error Unsupported architecture
|
2020-10-30 09:33:21 +01:00
|
|
|
#endif
|
|
|
|
|
2020-07-29 10:10:42 +02:00
|
|
|
extern HINSTANCE ResourceModule;
|
2020-10-24 22:12:47 +02:00
|
|
|
extern HANDLE ModuleHeap;
|
2020-10-30 13:26:36 +01:00
|
|
|
extern SECURITY_ATTRIBUTES SecurityAttributes;
|
2021-06-24 12:12:13 +02:00
|
|
|
extern BOOL IsLocalSystem;
|
2021-07-28 20:20:09 +02:00
|
|
|
extern USHORT NativeMachine;
|
2021-10-12 07:21:31 +02:00
|
|
|
|
|
|
|
#if NTDDI_VERSION > NTDDI_WIN7
|
|
|
|
# define IsWindows7 FALSE
|
|
|
|
#else
|
|
|
|
extern BOOL IsWindows7;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if NTDDI_VERSION >= NTDDI_WIN10
|
|
|
|
# define IsWindows10 TRUE
|
|
|
|
#else
|
|
|
|
extern BOOL IsWindows10;
|
|
|
|
#endif
|