-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfilter.h
More file actions
88 lines (62 loc) · 1.84 KB
/
Copy pathfilter.h
File metadata and controls
88 lines (62 loc) · 1.84 KB
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
86
87
/*++
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:
Kernel mode
--*/
#include <ntddk.h>
#include <wdf.h>
#include <wdmsec.h> // for SDDLs
#define NTSTRSAFE_LIB
#include <ntstrsafe.h>
#include <windef.h>
#include <ks.h>
#include <ksmedia.h>
#include <guiddef.h>
#if !defined(_FILTER_H_)
#define _FILTER_H_
//
// Change the following define to 1 if you want to forward
// the request with a completion routine.
//
#define FORWARD_REQUEST_WITH_COMPLETION 1
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_WDFDEVICE_WDM_IRP_PREPROCESS FilterEvtIrpPreprocess;
EVT_WDF_IO_IN_CALLER_CONTEXT FilterEvtIoInCallerContext;
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,
IN WDFCONTEXT Context
);
VOID
FilterRequestCompletionRoutine(
IN WDFREQUEST Request,
IN WDFIOTARGET Target,
PWDF_REQUEST_COMPLETION_PARAMS CompletionParams,
IN WDFCONTEXT Context
);
#endif //FORWARD_REQUEST_WITH_COMPLETION
#endif