blob: e9042c291127426c726d01a844b4a48101add888 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
Module Name:
filter.h
Abstract:
Contains structure definitions and function prototypes for a generic filter driver.
Environment:
User mode
--*/
#include <windows.h>
#include <winioctl.h>
#pragma warning( disable: 4201 ) // nonstandard extension used : nameless struct/union
#include <ntstatus.h>
#include <devpropdef.h>
#include <wudfwdm.h>
#include <wdf.h>
#if !defined(_FILTER_H_)
#define _FILTER_H_
#define DRIVERNAME "Generic.sys: "
//
// Change the following define to 1 if you want to forward
// the request with a completion routine.
//
#define FORWARD_REQUEST_WITH_COMPLETION 0
typedef struct _FILTER_EXTENSION
{
WDFDEVICE WdfDevice;
// More context data here
}FILTER_EXTENSION, *PFILTER_EXTENSION;
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(FILTER_EXTENSION,
FilterGetData)
DRIVER_INITIALIZE DriverEntry;
EVT_WDF_DRIVER_DEVICE_ADD FilterEvtDeviceAdd;
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL FilterEvtIoDeviceControl;
VOID
FilterForwardRequest(
IN WDFREQUEST Request,
IN WDFIOTARGET Target
);
#if FORWARD_REQUEST_WITH_COMPLETION
VOID
FilterForwardRequestWithCompletionRoutine(
IN WDFREQUEST Request,
IN WDFIOTARGET Target
);
VOID
FilterRequestCompletionRoutine(
IN WDFREQUEST Request,
IN WDFIOTARGET Target,
PWDF_REQUEST_COMPLETION_PARAMS CompletionParams,
IN WDFCONTEXT Context
);
#endif //FORWARD_REQUEST_WITH_COMPLETION
#endif
|