2 * Copyright (C) 2014 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 typedef struct _EX_PUSH_LOCK EX_PUSH_LOCK
, *PEX_PUSH_LOCK
;
26 typedef enum _FS_FILTER_SECTION_SYNC_TYPE
30 } FS_FILTER_SECTION_SYNC_TYPE
, *PFS_FILTER_SECTION_SYNC_TYPE
;
32 typedef struct _FS_FILTER_SECTION_SYNC_OUTPUT
37 ULONG DesiredReadAlignment
;
38 } FS_FILTER_SECTION_SYNC_OUTPUT
, *PFS_FILTER_SECTION_SYNC_OUTPUT
;
40 typedef struct _KQUEUE
42 DISPATCHER_HEADER Header
;
43 LIST_ENTRY EntryListHead
;
44 volatile ULONG CurrentCount
;
46 LIST_ENTRY ThreadListHead
;
47 } KQUEUE
, *PKQUEUE
, *RESTRICTED_POINTER PRKQUEUE
;
49 typedef enum _FS_FILTER_STREAM_FO_NOTIFICATION_TYPE
53 } FS_FILTER_STREAM_FO_NOTIFICATION_TYPE
, *PFS_FILTER_STREAM_FO_NOTIFICATION_TYPE
;
55 typedef union _FS_FILTER_PARAMETERS
59 PLARGE_INTEGER EndingOffset
;
60 PERESOURCE
*ResourceToRelease
;
61 } AcquireForModifiedPageWriter
;
65 PERESOURCE ResourceToRelease
;
66 } ReleaseForModifiedPageWriter
;
70 FS_FILTER_SECTION_SYNC_TYPE SyncType
;
72 PFS_FILTER_SECTION_SYNC_OUTPUT OutputInformation
;
73 } AcquireForSectionSynchronization
;
77 FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType
;
78 BOOLEAN POINTER_ALIGNMENT SafeToRecurse
;
79 } NotifyStreamFileObject
;
84 void *FileInformation
;
86 FILE_INFORMATION_CLASS FileInformationClass
;
87 NTSTATUS CompletionStatus
;
99 } FS_FILTER_PARAMETERS
, *PFS_FILTER_PARAMETERS
;
101 typedef struct _FS_FILTER_CALLBACK_DATA
103 ULONG SizeOfFsFilterCallbackData
;
106 struct _DEVICE_OBJECT
*DeviceObject
;
107 struct _FILE_OBJECT
*FileObject
;
108 FS_FILTER_PARAMETERS Parameters
;
109 } FS_FILTER_CALLBACK_DATA
, *PFS_FILTER_CALLBACK_DATA
;
111 typedef NTSTATUS (WINAPI
*PFS_FILTER_CALLBACK
)(PFS_FILTER_CALLBACK_DATA
, void **);
112 typedef void (WINAPI
*PFS_FILTER_COMPLETION_CALLBACK
)(PFS_FILTER_CALLBACK_DATA
, NTSTATUS
, void *context
);
114 typedef struct _FS_FILTER_CALLBACKS
116 ULONG SizeOfFsFilterCallbacks
;
118 PFS_FILTER_CALLBACK PreAcquireForSectionSynchronization
;
119 PFS_FILTER_COMPLETION_CALLBACK PostAcquireForSectionSynchronization
;
120 PFS_FILTER_CALLBACK PreReleaseForSectionSynchronization
;
121 PFS_FILTER_COMPLETION_CALLBACK PostReleaseForSectionSynchronization
;
122 PFS_FILTER_CALLBACK PreAcquireForCcFlush
;
123 PFS_FILTER_COMPLETION_CALLBACK PostAcquireForCcFlush
;
124 PFS_FILTER_CALLBACK PreReleaseForCcFlush
;
125 PFS_FILTER_COMPLETION_CALLBACK PostReleaseForCcFlush
;
126 PFS_FILTER_CALLBACK PreAcquireForModifiedPageWriter
;
127 PFS_FILTER_COMPLETION_CALLBACK PostAcquireForModifiedPageWriter
;
128 PFS_FILTER_CALLBACK PreReleaseForModifiedPageWriter
;
129 PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter
;
130 } FS_FILTER_CALLBACKS
, *PFS_FILTER_CALLBACKS
;
132 BOOLEAN WINAPI
FsRtlIsNameInExpression(PUNICODE_STRING
, PUNICODE_STRING
, BOOLEAN
, PWCH
);
133 DEVICE_OBJECT
* WINAPI
IoGetAttachedDevice(DEVICE_OBJECT
*);
134 PEPROCESS WINAPI
IoGetRequestorProcess(IRP
*);
135 void WINAPI
KeStackAttachProcess(KPROCESS
*,KAPC_STATE
*);
136 void WINAPI
KeUnstackDetachProcess(KAPC_STATE
*);
137 NTSTATUS WINAPI
ObOpenObjectByPointer(void*,ULONG
,PACCESS_STATE
,ACCESS_MASK
,POBJECT_TYPE
,KPROCESSOR_MODE
,HANDLE
*);
138 NTSTATUS WINAPI
ObQueryNameString(PVOID
,POBJECT_NAME_INFORMATION
,ULONG
,PULONG
);
139 BOOLEAN WINAPI
PsIsSystemThread(PETHREAD
);
140 NTSTATUS WINAPI
PsLookupProcessByProcessId(HANDLE
,PEPROCESS
*);
141 NTSTATUS WINAPI
PsLookupThreadByThreadId(HANDLE
,PETHREAD
*);
142 void WINAPI
PsRevertToSelf(void);