WDK Mini Filter Example
mspyLog.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1989-2002 Microsoft Corporation
4 
5 Module Name:
6 
7  mspyLog.h
8 
9 Abstract:
10 
11  This module contains the structures and prototypes used by the user
12  program to retrieve and see the log records recorded by MiniSpy.sys.
13 
14 Environment:
15 
16  User mode
17 
18 --*/
19 #ifndef __MSPYLOG_H__
20 #define __MSPYLOG_H__
21 
22 #include <stdio.h>
23 #include <fltUser.h>
24 #include "minispy.h"
25 
26 #define BUFFER_SIZE 4096
27 
28 //
29 // Structure for managing current state.
30 //
31 
32 typedef struct _LOG_CONTEXT {
33 
34  HANDLE Port;
35  BOOLEAN LogToScreen;
36  BOOLEAN LogToFile;
37  FILE *OutputFile;
38 
39  BOOLEAN NextLogToScreen;
40 
41  //
42  // For synchronizing shutting down of both threads
43  //
44 
45  BOOLEAN CleaningUp;
46  HANDLE ShutDown;
47 
49 
50 //
51 // Function prototypes
52 //
53 
54 DWORD WINAPI
56  _In_ LPVOID lpParameter
57  );
58 
59 VOID
60 FileDump (
61  _In_ ULONG SequenceNumber,
62  _In_ WCHAR CONST *Name,
63  _In_ PRECORD_DATA RecordData,
64  _In_ FILE *File
65  );
66 
67 VOID
69  _In_ ULONG SequenceNumber,
70  _In_ WCHAR CONST *Name,
71  _In_ PRECORD_DATA RecordData
72  );
73 
74 //
75 // Values set for the Flags field in a RECORD_DATA structure.
76 // These flags come from the FLT_CALLBACK_DATA structure.
77 //
78 
79 #define FLT_CALLBACK_DATA_IRP_OPERATION 0x00000001 // Set for Irp operations
80 #define FLT_CALLBACK_DATA_FAST_IO_OPERATION 0x00000002 // Set for Fast Io operations
81 #define FLT_CALLBACK_DATA_FS_FILTER_OPERATION 0x00000004 // Set for FsFilter operations
82 
83 //
84 // standard IRP_MJ string definitions
85 //
86 
87 #define IRP_MJ_CREATE_STRING "IRP_MJ_CREATE"
88 #define IRP_MJ_CREATE_NAMED_PIPE_STRING "IRP_MJ_CREATE_NAMED_PIPE"
89 #define IRP_MJ_CLOSE_STRING "IRP_MJ_CLOSE"
90 #define IRP_MJ_READ_STRING "IRP_MJ_READ"
91 #define IRP_MJ_WRITE_STRING "IRP_MJ_WRITE"
92 #define IRP_MJ_QUERY_INFORMATION_STRING "IRP_MJ_QUERY_INFORMATION"
93 #define IRP_MJ_SET_INFORMATION_STRING "IRP_MJ_SET_INFORMATION"
94 #define IRP_MJ_QUERY_EA_STRING "IRP_MJ_QUERY_EA"
95 #define IRP_MJ_SET_EA_STRING "IRP_MJ_SET_EA"
96 #define IRP_MJ_FLUSH_BUFFERS_STRING "IRP_MJ_FLUSH_BUFFERS"
97 #define IRP_MJ_QUERY_VOLUME_INFORMATION_STRING "IRP_MJ_QUERY_VOLUME_INFORMATION"
98 #define IRP_MJ_SET_VOLUME_INFORMATION_STRING "IRP_MJ_SET_VOLUME_INFORMATION"
99 #define IRP_MJ_DIRECTORY_CONTROL_STRING "IRP_MJ_DIRECTORY_CONTROL"
100 #define IRP_MJ_FILE_SYSTEM_CONTROL_STRING "IRP_MJ_FILE_SYSTEM_CONTROL"
101 #define IRP_MJ_DEVICE_CONTROL_STRING "IRP_MJ_DEVICE_CONTROL"
102 #define IRP_MJ_INTERNAL_DEVICE_CONTROL_STRING "IRP_MJ_INTERNAL_DEVICE_CONTROL"
103 #define IRP_MJ_SHUTDOWN_STRING "IRP_MJ_SHUTDOWN"
104 #define IRP_MJ_LOCK_CONTROL_STRING "IRP_MJ_LOCK_CONTROL"
105 #define IRP_MJ_CLEANUP_STRING "IRP_MJ_CLEANUP"
106 #define IRP_MJ_CREATE_MAILSLOT_STRING "IRP_MJ_CREATE_MAILSLOT"
107 #define IRP_MJ_QUERY_SECURITY_STRING "IRP_MJ_QUERY_SECURITY"
108 #define IRP_MJ_SET_SECURITY_STRING "IRP_MJ_SET_SECURITY"
109 #define IRP_MJ_POWER_STRING "IRP_MJ_POWER"
110 #define IRP_MJ_SYSTEM_CONTROL_STRING "IRP_MJ_SYSTEM_CONTROL"
111 #define IRP_MJ_DEVICE_CHANGE_STRING "IRP_MJ_DEVICE_CHANGE"
112 #define IRP_MJ_QUERY_QUOTA_STRING "IRP_MJ_QUERY_QUOTA"
113 #define IRP_MJ_SET_QUOTA_STRING "IRP_MJ_SET_QUOTA"
114 #define IRP_MJ_PNP_STRING "IRP_MJ_PNP"
115 #define IRP_MJ_MAXIMUM_FUNCTION_STRING "IRP_MJ_MAXIMUM_FUNCTION"
116 
117 //
118 // FSFilter string definitions
119 //
120 
121 #define IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION_STRING "IRP_MJ_ACQUIRE_FOR_SECTION_SYNC"
122 #define IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION_STRING "IRP_MJ_RELEASE_FOR_SECTION_SYNC"
123 #define IRP_MJ_ACQUIRE_FOR_MOD_WRITE_STRING "IRP_MJ_ACQUIRE_FOR_MOD_WRITE"
124 #define IRP_MJ_RELEASE_FOR_MOD_WRITE_STRING "IRP_MJ_RELEASE_FOR_MOD_WRITE"
125 #define IRP_MJ_ACQUIRE_FOR_CC_FLUSH_STRING "IRP_MJ_ACQUIRE_FOR_CC_FLUSH"
126 #define IRP_MJ_RELEASE_FOR_CC_FLUSH_STRING "IRP_MJ_RELEASE_FOR_CC_FLUSH"
127 #define IRP_MJ_NOTIFY_STREAM_FO_CREATION_STRING "IRP_MJ_NOTIFY_STREAM_FO_CREATION"
128 
129 //
130 // FAST_IO and other string definitions
131 //
132 
133 #define IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE_STRING "IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE"
134 #define IRP_MJ_DETACH_DEVICE_STRING "IRP_MJ_DETACH_DEVICE"
135 #define IRP_MJ_NETWORK_QUERY_OPEN_STRING "IRP_MJ_NETWORK_QUERY_OPEN"
136 #define IRP_MJ_MDL_READ_STRING "IRP_MJ_MDL_READ"
137 #define IRP_MJ_MDL_READ_COMPLETE_STRING "IRP_MJ_MDL_READ_COMPLETE"
138 #define IRP_MJ_PREPARE_MDL_WRITE_STRING "IRP_MJ_PREPARE_MDL_WRITE"
139 #define IRP_MJ_MDL_WRITE_COMPLETE_STRING "IRP_MJ_MDL_WRITE_COMPLETE"
140 #define IRP_MJ_VOLUME_MOUNT_STRING "IRP_MJ_VOLUME_MOUNT"
141 #define IRP_MJ_VOLUME_DISMOUNT_STRING "IRP_MJ_VOLUME_DISMOUNT"
142 
143 //
144 // Strings for the Irp minor codes
145 //
146 
147 #define IRP_MN_QUERY_DIRECTORY_STRING "IRP_MN_QUERY_DIRECTORY"
148 #define IRP_MN_NOTIFY_CHANGE_DIRECTORY_STRING "IRP_MN_NOTIFY_CHANGE_DIRECTORY"
149 #define IRP_MN_USER_FS_REQUEST_STRING "IRP_MN_USER_FS_REQUEST"
150 #define IRP_MN_MOUNT_VOLUME_STRING "IRP_MN_MOUNT_VOLUME"
151 #define IRP_MN_VERIFY_VOLUME_STRING "IRP_MN_VERIFY_VOLUME"
152 #define IRP_MN_LOAD_FILE_SYSTEM_STRING "IRP_MN_LOAD_FILE_SYSTEM"
153 #define IRP_MN_TRACK_LINK_STRING "IRP_MN_TRACK_LINK"
154 #define IRP_MN_LOCK_STRING "IRP_MN_LOCK"
155 #define IRP_MN_UNLOCK_SINGLE_STRING "IRP_MN_UNLOCK_SINGLE"
156 #define IRP_MN_UNLOCK_ALL_STRING "IRP_MN_UNLOCK_ALL"
157 #define IRP_MN_UNLOCK_ALL_BY_KEY_STRING "IRP_MN_UNLOCK_ALL_BY_KEY"
158 #define IRP_MN_NORMAL_STRING "IRP_MN_NORMAL"
159 #define IRP_MN_DPC_STRING "IRP_MN_DPC"
160 #define IRP_MN_MDL_STRING "IRP_MN_MDL"
161 #define IRP_MN_COMPLETE_STRING "IRP_MN_COMPLETE"
162 #define IRP_MN_COMPRESSED_STRING "IRP_MN_COMPRESSED"
163 #define IRP_MN_MDL_DPC_STRING "IRP_MN_MDL_DPC"
164 #define IRP_MN_COMPLETE_MDL_STRING "IRP_MN_COMPLETE_MDL"
165 #define IRP_MN_COMPLETE_MDL_DPC_STRING "IRP_MN_COMPLETE_MDL_DPC"
166 #define IRP_MN_SCSI_CLASS_STRING "IRP_MN_SCSI_CLASS"
167 #define IRP_MN_START_DEVICE_STRING "IRP_MN_START_DEVICE"
168 #define IRP_MN_QUERY_REMOVE_DEVICE_STRING "IRP_MN_QUERY_REMOVE_DEVICE"
169 #define IRP_MN_REMOVE_DEVICE_STRING "IRP_MN_REMOVE_DEVICE"
170 #define IRP_MN_CANCEL_REMOVE_DEVICE_STRING "IRP_MN_CANCEL_REMOVE_DEVICE"
171 #define IRP_MN_STOP_DEVICE_STRING "IRP_MN_STOP_DEVICE"
172 #define IRP_MN_QUERY_STOP_DEVICE_STRING "IRP_MN_QUERY_STOP_DEVICE"
173 #define IRP_MN_CANCEL_STOP_DEVICE_STRING "IRP_MN_CANCEL_STOP_DEVICE"
174 #define IRP_MN_QUERY_DEVICE_RELATIONS_STRING "IRP_MN_QUERY_DEVICE_RELATIONS"
175 #define IRP_MN_QUERY_INTERFACE_STRING "IRP_MN_QUERY_INTERFACE"
176 #define IRP_MN_QUERY_CAPABILITIES_STRING "IRP_MN_QUERY_CAPABILITIES"
177 #define IRP_MN_QUERY_RESOURCES_STRING "IRP_MN_QUERY_RESOURCES"
178 #define IRP_MN_QUERY_RESOURCE_REQUIREMENTS_STRING "IRP_MN_QUERY_RESOURCE_REQUIREMENTS"
179 #define IRP_MN_QUERY_DEVICE_TEXT_STRING "IRP_MN_QUERY_DEVICE_TEXT"
180 #define IRP_MN_FILTER_RESOURCE_REQUIREMENTS_STRING "IRP_MN_FILTER_RESOURCE_REQUIREMENTS"
181 #define IRP_MN_READ_CONFIG_STRING "IRP_MN_READ_CONFIG"
182 #define IRP_MN_WRITE_CONFIG_STRING "IRP_MN_WRITE_CONFIG"
183 #define IRP_MN_EJECT_STRING "IRP_MN_EJECT"
184 #define IRP_MN_SET_LOCK_STRING "IRP_MN_SET_LOCK"
185 #define IRP_MN_QUERY_ID_STRING "IRP_MN_QUERY_ID"
186 #define IRP_MN_QUERY_PNP_DEVICE_STATE_STRING "IRP_MN_QUERY_PNP_DEVICE_STATE"
187 #define IRP_MN_QUERY_BUS_INFORMATION_STRING "IRP_MN_QUERY_BUS_INFORMATION"
188 #define IRP_MN_DEVICE_USAGE_NOTIFICATION_STRING "IRP_MN_DEVICE_USAGE_NOTIFICATION"
189 #define IRP_MN_SURPRISE_REMOVAL_STRING "IRP_MN_SURPRISE_REMOVAL"
190 #define IRP_MN_QUERY_LEGACY_BUS_INFORMATION_STRING "IRP_MN_QUERY_LEGACY_BUS_INFORMATION"
191 #define IRP_MN_WAIT_WAKE_STRING "IRP_MN_WAIT_WAKE"
192 #define IRP_MN_POWER_SEQUENCE_STRING "IRP_MN_POWER_SEQUENCE"
193 #define IRP_MN_SET_POWER_STRING "IRP_MN_SET_POWER"
194 #define IRP_MN_QUERY_POWER_STRING "IRP_MN_QUERY_POWER"
195 #define IRP_MN_QUERY_ALL_DATA_STRING "IRP_MN_QUERY_ALL_DATA"
196 #define IRP_MN_QUERY_SINGLE_INSTANCE_STRING "IRP_MN_QUERY_SINGLE_INSTANCE"
197 #define IRP_MN_CHANGE_SINGLE_INSTANCE_STRING "IRP_MN_CHANGE_SINGLE_INSTANCE"
198 #define IRP_MN_CHANGE_SINGLE_ITEM_STRING "IRP_MN_CHANGE_SINGLE_ITEM"
199 #define IRP_MN_ENABLE_EVENTS_STRING "IRP_MN_ENABLE_EVENTS"
200 #define IRP_MN_DISABLE_EVENTS_STRING "IRP_MN_DISABLE_EVENTS"
201 #define IRP_MN_ENABLE_COLLECTION_STRING "IRP_MN_ENABLE_COLLECTION"
202 #define IRP_MN_DISABLE_COLLECTION_STRING "IRP_MN_DISABLE_COLLECTION"
203 #define IRP_MN_REGINFO_STRING "IRP_MN_REGINFO"
204 #define IRP_MN_EXECUTE_METHOD_STRING "IRP_MN_EXECUTE_METHOD"
205 
206 //
207 // Transaction notification string definitions.
208 //
209 
210 #define IRP_MJ_TRANSACTION_NOTIFY_STRING "IRP_MJ_TRANSACTION_NOTIFY"
211 
212 #define TRANSACTION_BEGIN "BEGIN_TRANSACTION"
213 #define TRANSACTION_NOTIFY_PREPREPARE_STRING "TRANSACTION_NOTIFY_PREPREPARE"
214 #define TRANSACTION_NOTIFY_PREPARE_STRING "TRANSACTION_NOTIFY_PREPARE"
215 #define TRANSACTION_NOTIFY_COMMIT_STRING "TRANSACTION_NOTIFY_COMMIT"
216 #define TRANSACTION_NOTIFY_ROLLBACK_STRING "TRANSACTION_NOTIFY_ROLLBACK"
217 #define TRANSACTION_NOTIFY_PREPREPARE_COMPLETE_STRING "TRANSACTION_NOTIFY_PREPREPARE_COMPLETE"
218 #define TRANSACTION_NOTIFY_PREPARE_COMPLETE_STRING "TRANSACTION_NOTIFY_PREPARE_COMPLETE"
219 #define TRANSACTION_NOTIFY_COMMIT_COMPLETE_STRING "TRANSACTION_NOTIFY_COMMIT_COMPLETE"
220 #define TRANSACTION_NOTIFY_COMMIT_FINALIZE_STRING "TRANSACTION_NOTIFY_COMMIT_FINALIZE"
221 #define TRANSACTION_NOTIFY_ROLLBACK_COMPLETE_STRING "TRANSACTION_NOTIFY_ROLLBACK_COMPLETE"
222 #define TRANSACTION_NOTIFY_RECOVER_STRING "TRANSACTION_NOTIFY_RECOVER"
223 #define TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT_STRING "TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT"
224 #define TRANSACTION_NOTIFY_DELEGATE_COMMIT_STRING "TRANSACTION_NOTIFY_DELEGATE_COMMIT"
225 #define TRANSACTION_NOTIFY_RECOVER_QUERY_STRING "TRANSACTION_NOTIFY_RECOVER_QUERY"
226 #define TRANSACTION_NOTIFY_ENLIST_PREPREPARE_STRING "TRANSACTION_NOTIFY_ENLIST_PREPREPARE"
227 #define TRANSACTION_NOTIFY_LAST_RECOVER_STRING "TRANSACTION_NOTIFY_LAST_RECOVER"
228 #define TRANSACTION_NOTIFY_INDOUBT_STRING "TRANSACTION_NOTIFY_INDOUBT"
229 #define TRANSACTION_NOTIFY_PROPAGATE_PULL_STRING "TRANSACTION_NOTIFY_PROPAGATE_PULL"
230 #define TRANSACTION_NOTIFY_PROPAGATE_PUSH_STRING "TRANSACTION_NOTIFY_PROPAGATE_PUSH"
231 #define TRANSACTION_NOTIFY_MARSHAL_STRING "TRANSACTION_NOTIFY_MARSHAL"
232 #define TRANSACTION_NOTIFY_ENLIST_MASK_STRING "TRANSACTION_NOTIFY_ENLIST_MASK"
233 
234 
235 //
236 // FltMgr's IRP major codes
237 //
238 
239 #define IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION ((UCHAR)-1)
240 #define IRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATION ((UCHAR)-2)
241 #define IRP_MJ_ACQUIRE_FOR_MOD_WRITE ((UCHAR)-3)
242 #define IRP_MJ_RELEASE_FOR_MOD_WRITE ((UCHAR)-4)
243 #define IRP_MJ_ACQUIRE_FOR_CC_FLUSH ((UCHAR)-5)
244 #define IRP_MJ_RELEASE_FOR_CC_FLUSH ((UCHAR)-6)
245 #define IRP_MJ_NOTIFY_STREAM_FO_CREATION ((UCHAR)-7)
246 
247 #define IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE ((UCHAR)-13)
248 #define IRP_MJ_NETWORK_QUERY_OPEN ((UCHAR)-14)
249 #define IRP_MJ_MDL_READ ((UCHAR)-15)
250 #define IRP_MJ_MDL_READ_COMPLETE ((UCHAR)-16)
251 #define IRP_MJ_PREPARE_MDL_WRITE ((UCHAR)-17)
252 #define IRP_MJ_MDL_WRITE_COMPLETE ((UCHAR)-18)
253 #define IRP_MJ_VOLUME_MOUNT ((UCHAR)-19)
254 #define IRP_MJ_VOLUME_DISMOUNT ((UCHAR)-20)
255 
256 
257 typedef enum {
279 
280 //
281 // Standard IRP Major codes
282 //
283 
284 #define IRP_MJ_CREATE 0x00
285 #define IRP_MJ_CREATE_NAMED_PIPE 0x01
286 #define IRP_MJ_CLOSE 0x02
287 #define IRP_MJ_READ 0x03
288 #define IRP_MJ_WRITE 0x04
289 #define IRP_MJ_QUERY_INFORMATION 0x05
290 #define IRP_MJ_SET_INFORMATION 0x06
291 #define IRP_MJ_QUERY_EA 0x07
292 #define IRP_MJ_SET_EA 0x08
293 #define IRP_MJ_FLUSH_BUFFERS 0x09
294 #define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a
295 #define IRP_MJ_SET_VOLUME_INFORMATION 0x0b
296 #define IRP_MJ_DIRECTORY_CONTROL 0x0c
297 #define IRP_MJ_FILE_SYSTEM_CONTROL 0x0d
298 #define IRP_MJ_DEVICE_CONTROL 0x0e
299 #define IRP_MJ_INTERNAL_DEVICE_CONTROL 0x0f
300 #define IRP_MJ_SHUTDOWN 0x10
301 #define IRP_MJ_LOCK_CONTROL 0x11
302 #define IRP_MJ_CLEANUP 0x12
303 #define IRP_MJ_CREATE_MAILSLOT 0x13
304 #define IRP_MJ_QUERY_SECURITY 0x14
305 #define IRP_MJ_SET_SECURITY 0x15
306 #define IRP_MJ_POWER 0x16
307 #define IRP_MJ_SYSTEM_CONTROL 0x17
308 #define IRP_MJ_DEVICE_CHANGE 0x18
309 #define IRP_MJ_QUERY_QUOTA 0x19
310 #define IRP_MJ_SET_QUOTA 0x1a
311 #define IRP_MJ_PNP 0x1b
312 #define IRP_MJ_MAXIMUM_FUNCTION 0x1b
313 
314 //
315 // IRP minor codes
316 //
317 
318 #define IRP_MN_QUERY_DIRECTORY 0x01
319 #define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02
320 #define IRP_MN_USER_FS_REQUEST 0x00
321 #define IRP_MN_MOUNT_VOLUME 0x01
322 #define IRP_MN_VERIFY_VOLUME 0x02
323 #define IRP_MN_LOAD_FILE_SYSTEM 0x03
324 #define IRP_MN_TRACK_LINK 0x04
325 #define IRP_MN_LOCK 0x01
326 #define IRP_MN_UNLOCK_SINGLE 0x02
327 #define IRP_MN_UNLOCK_ALL 0x03
328 #define IRP_MN_UNLOCK_ALL_BY_KEY 0x04
329 #define IRP_MN_NORMAL 0x00
330 #define IRP_MN_DPC 0x01
331 #define IRP_MN_MDL 0x02
332 #define IRP_MN_COMPLETE 0x04
333 #define IRP_MN_COMPRESSED 0x08
334 #define IRP_MN_MDL_DPC (IRP_MN_MDL | IRP_MN_DPC)
335 #define IRP_MN_COMPLETE_MDL (IRP_MN_COMPLETE | IRP_MN_MDL)
336 #define IRP_MN_COMPLETE_MDL_DPC (IRP_MN_COMPLETE_MDL | IRP_MN_DPC)
337 #define IRP_MN_SCSI_CLASS 0x01
338 #define IRP_MN_START_DEVICE 0x00
339 #define IRP_MN_QUERY_REMOVE_DEVICE 0x01
340 #define IRP_MN_REMOVE_DEVICE 0x02
341 #define IRP_MN_CANCEL_REMOVE_DEVICE 0x03
342 #define IRP_MN_STOP_DEVICE 0x04
343 #define IRP_MN_QUERY_STOP_DEVICE 0x05
344 #define IRP_MN_CANCEL_STOP_DEVICE 0x06
345 #define IRP_MN_QUERY_DEVICE_RELATIONS 0x07
346 #define IRP_MN_QUERY_INTERFACE 0x08
347 #define IRP_MN_QUERY_CAPABILITIES 0x09
348 #define IRP_MN_QUERY_RESOURCES 0x0A
349 #define IRP_MN_QUERY_RESOURCE_REQUIREMENTS 0x0B
350 #define IRP_MN_QUERY_DEVICE_TEXT 0x0C
351 #define IRP_MN_FILTER_RESOURCE_REQUIREMENTS 0x0D
352 #define IRP_MN_READ_CONFIG 0x0F
353 #define IRP_MN_WRITE_CONFIG 0x10
354 #define IRP_MN_EJECT 0x11
355 #define IRP_MN_SET_LOCK 0x12
356 #define IRP_MN_QUERY_ID 0x13
357 #define IRP_MN_QUERY_PNP_DEVICE_STATE 0x14
358 #define IRP_MN_QUERY_BUS_INFORMATION 0x15
359 #define IRP_MN_DEVICE_USAGE_NOTIFICATION 0x16
360 #define IRP_MN_SURPRISE_REMOVAL 0x17
361 #define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
362 #define IRP_MN_WAIT_WAKE 0x00
363 #define IRP_MN_POWER_SEQUENCE 0x01
364 #define IRP_MN_SET_POWER 0x02
365 #define IRP_MN_QUERY_POWER 0x03
366 #define IRP_MN_QUERY_ALL_DATA 0x00
367 #define IRP_MN_QUERY_SINGLE_INSTANCE 0x01
368 #define IRP_MN_CHANGE_SINGLE_INSTANCE 0x02
369 #define IRP_MN_CHANGE_SINGLE_ITEM 0x03
370 #define IRP_MN_ENABLE_EVENTS 0x04
371 #define IRP_MN_DISABLE_EVENTS 0x05
372 #define IRP_MN_ENABLE_COLLECTION 0x06
373 #define IRP_MN_DISABLE_COLLECTION 0x07
374 #define IRP_MN_REGINFO 0x08
375 #define IRP_MN_EXECUTE_METHOD 0x09
376 
377 //
378 // IRP Flags
379 //
380 
381 #define IRP_NOCACHE 0x00000001
382 #define IRP_PAGING_IO 0x00000002
383 #define IRP_SYNCHRONOUS_API 0x00000004
384 #define IRP_SYNCHRONOUS_PAGING_IO 0x00000040
385 
386 //
387 // Define the FLT_TAG_DATA structure so that we can display it.
388 //
389 
390 #pragma warning(push)
391 #pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
392 
393 typedef struct _FLT_TAG_DATA_BUFFER {
394  ULONG FileTag;
397  union {
398  GUID TagGuid;
399  struct {
404  ULONG Flags;
405  WCHAR PathBuffer[1];
406  } SymbolicLinkReparseBuffer;
407 
408  struct {
409  USHORT SubstituteNameOffset;
410  USHORT SubstituteNameLength;
411  USHORT PrintNameOffset;
412  USHORT PrintNameLength;
413  WCHAR PathBuffer[1];
414  } MountPointReparseBuffer;
415 
416  struct {
417  UCHAR DataBuffer[1];
418  } GenericReparseBuffer;
419  };
421 
422 #pragma warning(pop)
423 
424 #endif //__MSPYLOG_H__
425 
BOOLEAN LogToScreen
Definition: mspyLog.h:35
USHORT TagDataLength
Definition: mspyLog.h:395
USHORT SubstituteNameOffset
Definition: mspyLog.h:400
FILE * OutputFile
Definition: mspyLog.h:37
USHORT PrintNameOffset
Definition: mspyLog.h:402
HANDLE ShutDown
Definition: mspyLog.h:46
BOOLEAN NextLogToScreen
Definition: mspyLog.h:39
TRANSACTION_NOTIFICATION_CODES
Definition: mspyLog.h:257
DWORD WINAPI RetrieveLogRecords(_In_ LPVOID lpParameter)
Definition: mspyLog.c:97
VOID FileDump(_In_ ULONG SequenceNumber, _In_ WCHAR CONST *Name, _In_ PRECORD_DATA RecordData, _In_ FILE *File)
Definition: mspyLog.c:902
BOOLEAN LogToFile
Definition: mspyLog.h:36
BOOLEAN CleaningUp
Definition: mspyLog.h:45
struct _LOG_CONTEXT * PLOG_CONTEXT
struct _FLT_TAG_DATA_BUFFER FLT_TAG_DATA_BUFFER
USHORT PrintNameLength
Definition: mspyLog.h:403
HANDLE Port
Definition: mspyLog.h:34
struct _FLT_TAG_DATA_BUFFER * PFLT_TAG_DATA_BUFFER
struct _LOG_CONTEXT LOG_CONTEXT
VOID ScreenDump(_In_ ULONG SequenceNumber, _In_ WCHAR CONST *Name, _In_ PRECORD_DATA RecordData)
Definition: mspyLog.c:1051
USHORT UnparsedNameLength
Definition: mspyLog.h:396
USHORT SubstituteNameLength
Definition: mspyLog.h:401

Social Network


Services Overview

Architect, implement and test file system filter drivers for a wide range of functionality. We can offer several levels of assistance to meet your specific.

Contact Us

You are welcome to contact us for salse or partnership.

Sales: sales@easefilter.com
Support: support@easefilter.com
Info: info@easefilter.com