reactos/modules/rostests/kmtests/include/kmt_platform.h
Ged Murphy dfb776380d
[FLTMGR] Latest from my branch (#135)
[FLTMGR][KMTEST] 
Squash and push my local branch across to master as the patch is getting a bit large. This is still WIP and none of this code is run in ros yet, so don't fret if you see ugly/unfinished code or int3's dotted around.

[FLTMGR] Improve loading/reg of filters and start to implement client connections
- Implement handling of connections from clients
- Implement closing of client ports
- Add a basic message waiter queue using CSQ's (untested)
- Hand off messages for the comms object to be handled by the comms file
- Initialize the connection list
- Add a registry file which will contain lib functions for accessing filter service entries

- [KMTEST] Initial usermode support for testing FS mini-filters
- Add base routines to wrap the win32 'Filter' APis
- Add support routines to be used when testing FS filter drivers
- Move KmtCreateService to a private routine so it can be shared with KmtFltCreateService
- Completely untested at the mo, so likely contains bugs at this point
- Add support for adding altitude and flags registry entries for minifilters
- Allow minifilters to setup without requiring instance attach/detach callbacks
- Add tests for FltRegisterFilter and FltUnregisterFilter and start to add associated tests
2017-11-21 16:36:29 +00:00

73 lines
2 KiB
C

/*
* PROJECT: ReactOS kernel-mode tests
* LICENSE: GPLv2+ - See COPYING in the top level directory
* PURPOSE: Kernel-Mode Test Suite platform declarations
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#ifndef _KMTEST_PLATFORM_H_
#define _KMTEST_PLATFORM_H_
#if !defined _KMTEST_TEST_H_
#error include kmt_test.h instead of including kmt_platform.h!
#endif /* !defined _KMTEST_TEST_H_ */
#include <limits.h>
#include <malloc.h>
#include <stdarg.h>
#if defined KMT_KERNEL_MODE || defined KMT_STANDALONE_DRIVER
#include <ntddk.h>
#include <ntifs.h>
#include <ndk/exfuncs.h>
#include <ndk/kefuncs.h>
#include <ndk/mmfuncs.h>
#include <ndk/obfuncs.h>
#include <ndk/sefuncs.h>
#include <ntstrsafe.h>
#if defined KMT_FILTER_DRIVER
#include <fltkernel.h>
#endif
#elif defined KMT_USER_MODE
#define WIN32_NO_STATUS
#define UNICODE
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <winsvc.h>
#include <ndk/cmfuncs.h>
#include <ndk/iofuncs.h>
#include <ndk/obfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ndk/mmfuncs.h>
#include <strsafe.h>
#include <fltuser.h>
#ifdef KMT_EMULATE_KERNEL
#define ok_irql(i)
#define KIRQL int
typedef const UCHAR CUCHAR, *PCUCHAR;
typedef ULONG LOGICAL, *PLOGICAL;
#undef KeRaiseIrql
#define KeRaiseIrql(new, old) *(old) = 123
#undef KeLowerIrql
#define KeLowerIrql(i) (void)(i)
#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)
#define RtlCopyMemoryNonTemporal RtlCopyMemory
#define RtlPrefetchMemoryNonTemporal(s, l)
#define ExRaiseStatus RtlRaiseStatus
#define KmtIsCheckedBuild FALSE
#endif /* defined KMT_EMULATE_KERNEL */
#endif /* defined KMT_USER_MODE */
#include <pseh/pseh2.h>
#endif /* !defined _KMTEST_PLATFORM_H_ */