2011-08-01 21:53:52 +00:00
|
|
|
/*
|
2018-02-18 10:14:13 +00:00
|
|
|
* PROJECT: ReactOS kernel-mode tests
|
|
|
|
* LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
|
|
|
|
* PURPOSE: Kernel-Mode Test Suite platform declarations
|
|
|
|
* COPYRIGHT: Copyright 2011-2018 Thomas Faber <thomas.faber@reactos.org>
|
|
|
|
* Copyright 2017 Ged Murphy <gedmurphy@reactos.org>
|
2011-08-01 21:53:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _KMTEST_PLATFORM_H_
|
|
|
|
#define _KMTEST_PLATFORM_H_
|
|
|
|
|
2011-08-18 07:08:59 +00:00
|
|
|
#if !defined _KMTEST_TEST_H_
|
|
|
|
#error include kmt_test.h instead of including kmt_platform.h!
|
|
|
|
#endif /* !defined _KMTEST_TEST_H_ */
|
|
|
|
|
2013-02-05 17:54:22 +00:00
|
|
|
#include <limits.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2011-08-01 21:53:52 +00:00
|
|
|
#if defined KMT_KERNEL_MODE || defined KMT_STANDALONE_DRIVER
|
|
|
|
#include <ntddk.h>
|
|
|
|
#include <ntifs.h>
|
2013-02-05 17:54:22 +00:00
|
|
|
#include <ndk/exfuncs.h>
|
|
|
|
#include <ndk/kefuncs.h>
|
|
|
|
#include <ndk/mmfuncs.h>
|
2013-07-20 19:36:41 +00:00
|
|
|
#include <ndk/obfuncs.h>
|
2019-06-20 06:53:27 +00:00
|
|
|
#include <ndk/psfuncs.h>
|
2013-07-20 19:36:41 +00:00
|
|
|
#include <ndk/sefuncs.h>
|
2011-08-01 21:53:52 +00:00
|
|
|
#include <ntstrsafe.h>
|
2017-10-12 14:32:30 +00:00
|
|
|
#if defined KMT_FILTER_DRIVER
|
|
|
|
#include <fltkernel.h>
|
|
|
|
#endif
|
2011-08-01 21:53:52 +00:00
|
|
|
|
|
|
|
#elif defined KMT_USER_MODE
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define UNICODE
|
2013-02-05 17:54:22 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
2013-07-20 19:36:41 +00:00
|
|
|
#include <winreg.h>
|
2013-02-05 17:54:22 +00:00
|
|
|
#include <winsvc.h>
|
2013-07-20 19:36:41 +00:00
|
|
|
#include <ndk/cmfuncs.h>
|
2015-05-01 11:03:21 +00:00
|
|
|
#include <ndk/iofuncs.h>
|
2013-07-20 19:36:41 +00:00
|
|
|
#include <ndk/obfuncs.h>
|
2013-02-05 17:54:22 +00:00
|
|
|
#include <ndk/rtlfuncs.h>
|
|
|
|
#include <ndk/mmfuncs.h>
|
2011-08-01 21:53:52 +00:00
|
|
|
#include <strsafe.h>
|
2017-10-25 09:39:55 +00:00
|
|
|
#include <fltuser.h>
|
2011-08-01 21:53:52 +00:00
|
|
|
|
2017-11-21 16:36:29 +00:00
|
|
|
|
2011-08-01 21:53:52 +00:00
|
|
|
#ifdef KMT_EMULATE_KERNEL
|
|
|
|
#define ok_irql(i)
|
|
|
|
#define KIRQL int
|
2011-08-05 09:44:20 +00:00
|
|
|
typedef const UCHAR CUCHAR, *PCUCHAR;
|
|
|
|
typedef ULONG LOGICAL, *PLOGICAL;
|
2011-08-01 21:53:52 +00:00
|
|
|
|
|
|
|
#undef KeRaiseIrql
|
2011-08-19 19:03:46 +00:00
|
|
|
#define KeRaiseIrql(new, old) *(old) = 123
|
2011-08-01 21:53:52 +00:00
|
|
|
#undef KeLowerIrql
|
2011-08-19 19:03:46 +00:00
|
|
|
#define KeLowerIrql(i) (void)(i)
|
2011-08-01 21:53:52 +00:00
|
|
|
#define ExAllocatePool(type, size) HeapAlloc(GetProcessHeap(), 0, size)
|
|
|
|
#define ExAllocatePoolWithTag(type, size, tag) HeapAlloc(GetProcessHeap(), 0, size)
|
|
|
|
#define ExFreePool(p) HeapFree(GetProcessHeap(), 0, p)
|
|
|
|
#define ExFreePoolWithTag(p, tag) HeapFree(GetProcessHeap(), 0, p)
|
2011-08-05 21:12:11 +00:00
|
|
|
#define RtlCopyMemoryNonTemporal RtlCopyMemory
|
2011-08-05 09:44:20 +00:00
|
|
|
#define RtlPrefetchMemoryNonTemporal(s, l)
|
2015-02-19 12:55:57 +00:00
|
|
|
#define ExRaiseStatus RtlRaiseStatus
|
2015-02-27 22:42:35 +00:00
|
|
|
#define KmtIsCheckedBuild FALSE
|
2011-08-01 21:53:52 +00:00
|
|
|
#endif /* defined KMT_EMULATE_KERNEL */
|
|
|
|
|
|
|
|
#endif /* defined KMT_USER_MODE */
|
|
|
|
|
|
|
|
#include <pseh/pseh2.h>
|
|
|
|
|
|
|
|
#endif /* !defined _KMTEST_PLATFORM_H_ */
|