ReactOS 0.4.15-dev-8222-g9164419
CcCopyRead_drv.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS kernel-mode tests
3 * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4 * PURPOSE: Test driver for CcCopyRead function
5 * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
6 */
7
8#include <kmt_test.h>
9
10#define NDEBUG
11#include <debug.h>
12
13typedef struct _TEST_FCB
14{
20
23static KMT_IRP_HANDLER TestIrpHandler;
26
30
31static
43{
45 return FALSE;
46}
47
54{
56
57 PAGED_CODE();
58
60
61 *DeviceName = L"CcCopyRead";
62 *Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
63 TESTENTRY_BUFFERED_IO_DEVICE |
64 TESTENTRY_NO_READONLY_DEVICE;
65
69
71 DriverObject->FastIoDispatch = &TestFastIoDispatch;
72
73
74 return Status;
75}
76
77VOID
80{
81 PAGED_CODE();
82}
83
89{
90 return TRUE;
91}
92
93VOID
97{
98 return;
99}
100
102NTAPI
106{
107 return TRUE;
108}
109
110VOID
111NTAPI
114{
115 return;
116}
117
123};
124
125static
126PVOID
130{
131 PMDL Mdl;
132
133 if (Irp->MdlAddress == NULL)
134 {
135 Mdl = IoAllocateMdl(Irp->UserBuffer, BufferLength, FALSE, FALSE, Irp);
136 if (Mdl == NULL)
137 {
138 return NULL;
139 }
140
142 {
143 MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoWriteAccess);
144 }
146 {
147 IoFreeMdl(Mdl);
148 Irp->MdlAddress = NULL;
149 _SEH2_YIELD(return NULL);
150 }
151 _SEH2_END;
152 }
153
155}
156
157static
158void
160{
162 ReadOffset.QuadPart = MAXLONGLONG;
164}
165
166#define ok_read_called(_Offset, _Length) do { \
167 ok(ReadCalledNonCached, "CcCopyRead should have triggerred a non-cached read.\n"); \
168 ok_eq_longlong(ReadOffset.QuadPart, _Offset); \
169 ok_eq_ulong(ReadLength, _Length); \
170}while(0)
171
172#define ok_read_not_called() ok(!ReadCalledNonCached, "CcCopyRead shouldn't have triggered a read.\n")
173
174static
175VOID
177{
178
179 BOOLEAN Ret;
181 CHAR Buffer[10];
183
184 memset(Buffer, 0xAC, 10);
185
186 /* Test bogus file object & file offset */
187 Ret = 'x';
191 ok_eq_char(Ret, 'x');
192
193 Ret = 'x';
194 Offset.QuadPart = 0;
196 Ret = CcCopyRead(NULL, &Offset, 10, FALSE, Buffer, &IoStatus);
198 ok_eq_char(Ret, 'x');
199
200 /* What happens on invalid buffer */
201 Ret = 'x';
202 Offset.QuadPart = 0;
203 memset(&IoStatus, 0xAB, sizeof(IoStatus));
204 reset_read();
208 ok_bool_true(Ret, "CcCopyRead(0, NULL) should succeed\n");
209 /* When there is nothing to write, there is no reason to read */
212 ok_eq_ulongptr(IoStatus.Information, 0);
213
214 Ret = 'x';
215 Offset.QuadPart = 0;
216 memset(&IoStatus, 0xAB, sizeof(IoStatus));
217 reset_read();
219 Ret = CcCopyRead(FileObject, &Offset, 10, TRUE, NULL, &IoStatus);
221 ok_eq_char(Ret, 'x');
222 /* This raises an exception, but it actually triggered a read */
224 ok_eq_hex(IoStatus.Status, 0xABABABAB);
225 ok_eq_ulongptr(IoStatus.Information, (ULONG_PTR)0xABABABABABABABAB);
226
227 /* So this one succeeds, as the page is now resident */
228 Ret = 'x';
229 Offset.QuadPart = 0;
230 memset(&IoStatus, 0xAB, sizeof(IoStatus));
231 reset_read();
235 ok_bool_true(Ret, "CcCopyRead should succeed\n");
236 /* But there was no read triggered, as the page is already resident. */
239 ok_eq_ulongptr(IoStatus.Information, 10);
240
241 /* But this one doesn't */
242 Ret = 'x';
243 Offset.QuadPart = PAGE_SIZE;
244 memset(&IoStatus, 0xAB, sizeof(IoStatus));
245 reset_read();
249 ok_bool_false(Ret, "CcCopyRead should fail\n");
250 /* But it triggered a read anyway. */
252 ok_eq_hex(IoStatus.Status, 0xABABABAB);
253 ok_eq_ulongptr(IoStatus.Information, (ULONG_PTR)0xABABABABABABABAB);
254
255 /* Of course, waiting for it succeeds and triggers the read */
256 Ret = 'x';
257 Offset.QuadPart = PAGE_SIZE * 2;
258 memset(&IoStatus, 0xAB, sizeof(IoStatus));
259 reset_read();
263 ok_bool_true(Ret, "CcCopyRead should succeed\n");
266 ok_eq_ulongptr(IoStatus.Information, 10);
267
268 /* Try the same without a status block */
269 Ret = 'x';
270 Offset.QuadPart = PAGE_SIZE * 2;
272 Ret = CcCopyRead(FileObject, &Offset, 10, TRUE, Buffer, NULL);
274 ok_eq_char(Ret, 'x');
275}
276
277
278static
282 _In_ PIRP Irp,
283 _In_ PIO_STACK_LOCATION IoStack)
284{
288 CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
289
290 PAGED_CODE();
291
292 DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
293 ASSERT(IoStack->MajorFunction == IRP_MJ_CLEANUP ||
294 IoStack->MajorFunction == IRP_MJ_CREATE ||
295 IoStack->MajorFunction == IRP_MJ_READ);
296
298 Irp->IoStatus.Information = 0;
299
300 if (IoStack->MajorFunction == IRP_MJ_CREATE)
301 {
302 ok_irql(PASSIVE_LEVEL);
303
304 if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR))
305 {
307 TestFileObject = IoStack->FileObject;
308 }
309 Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(*Fcb), 'FwrI');
310 RtlZeroMemory(Fcb, sizeof(*Fcb));
311 ExInitializeFastMutex(&Fcb->HeaderMutex);
312 FsRtlSetupAdvancedHeader(&Fcb->Header, &Fcb->HeaderMutex);
313 Fcb->BigFile = FALSE;
314 if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
315 IoStack->FileObject->FileName.Buffer[1] == 'B')
316 {
317 Fcb->Header.AllocationSize.QuadPart = 1000000;
318 Fcb->Header.FileSize.QuadPart = 1000000;
319 Fcb->Header.ValidDataLength.QuadPart = 1000000;
320 }
321 else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
322 IoStack->FileObject->FileName.Buffer[1] == 'S')
323 {
324 Fcb->Header.AllocationSize.QuadPart = 1004;
325 Fcb->Header.FileSize.QuadPart = 1004;
326 Fcb->Header.ValidDataLength.QuadPart = 1004;
327 }
328 else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
329 IoStack->FileObject->FileName.Buffer[1] == 'R')
330 {
331 Fcb->Header.AllocationSize.QuadPart = 62;
332 Fcb->Header.FileSize.QuadPart = 62;
333 Fcb->Header.ValidDataLength.QuadPart = 62;
334 }
335 else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
336 IoStack->FileObject->FileName.Buffer[1] == 'F')
337 {
338 Fcb->Header.AllocationSize.QuadPart = 4294967296;
339 Fcb->Header.FileSize.QuadPart = 4294967296;
340 Fcb->Header.ValidDataLength.QuadPart = 4294967296;
341 Fcb->BigFile = TRUE;
342 }
343 else
344 {
345 Fcb->Header.AllocationSize.QuadPart = 512;
346 Fcb->Header.FileSize.QuadPart = 512;
347 Fcb->Header.ValidDataLength.QuadPart = 512;
348 }
349 Fcb->Header.IsFastIoPossible = FastIoIsNotPossible;
350 IoStack->FileObject->FsContext = Fcb;
351 IoStack->FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
352
353 CcInitializeCacheMap(IoStack->FileObject,
354 (PCC_FILE_SIZES)&Fcb->Header.AllocationSize,
355 FALSE, &Callbacks, NULL);
356
357 Irp->IoStatus.Information = FILE_OPENED;
359 }
360 else if (IoStack->MajorFunction == IRP_MJ_READ)
361 {
362 BOOLEAN Ret;
366 static const UNICODE_STRING BehaviourTestFileName = RTL_CONSTANT_STRING(L"\\BehaviourTestFile");
367
368 Offset = IoStack->Parameters.Read.ByteOffset;
369 Length = IoStack->Parameters.Read.Length;
370 Fcb = IoStack->FileObject->FsContext;
371
373 ok_eq_pointer(IoStack->FileObject, TestFileObject);
374
375 /* Check special file name */
376 InBehaviourTest = RtlCompareUnicodeString(&IoStack->FileObject->FileName, &BehaviourTestFileName, TRUE) == 0;
377
378 if (!FlagOn(Irp->Flags, IRP_NOCACHE))
379 {
380 ok_irql(PASSIVE_LEVEL);
381
382 if (InBehaviourTest)
383 {
384 Test_CcCopyRead(IoStack->FileObject);
385 Status = Irp->IoStatus.Status = STATUS_SUCCESS;
386 }
387 else
388 {
389 /* We don't want to test alignement for big files (not the purpose of the test) */
390 if (!Fcb->BigFile)
391 {
392 ok(Offset.QuadPart % PAGE_SIZE != 0, "Offset is aligned: %I64i\n", Offset.QuadPart);
393 ok(Length % PAGE_SIZE != 0, "Length is aligned: %I64i\n", Length);
394 }
395
396 Buffer = Irp->AssociatedIrp.SystemBuffer;
397 ok(Buffer != NULL, "Null pointer!\n");
398
400 {
401 Ret = CcCopyRead(IoStack->FileObject, &Offset, Length, TRUE, Buffer,
402 &Irp->IoStatus);
403 ok_bool_true(Ret, "CcCopyRead");
404 }
406 {
407 Irp->IoStatus.Status = _SEH2_GetExceptionCode();
408 }
409 _SEH2_END;
410
411 Status = Irp->IoStatus.Status;
412
413 if (NT_SUCCESS(Status))
414 {
415 if (Offset.QuadPart <= 1000LL && Offset.QuadPart + Length > 1000LL)
416 {
417 ok_eq_hex(*(PUSHORT)((ULONG_PTR)Buffer + (ULONG_PTR)(1000LL - Offset.QuadPart)), 0xFFFF);
418 }
419 else
420 {
421 ok_eq_hex(*(PUSHORT)Buffer, 0xBABA);
422 }
423 }
424 }
425 }
426 else
427 {
428 PMDL Mdl;
429
433
434 ok_irql(APC_LEVEL);
435 ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart);
436 ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
437
438 ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
440 ok(Buffer != NULL, "Null pointer!\n");
442
444 if (Offset.QuadPart <= 1000LL && Offset.QuadPart + Length > 1000LL)
445 {
446 *(PUSHORT)((ULONG_PTR)Buffer + (ULONG_PTR)(1000LL - Offset.QuadPart)) = 0xFFFF;
447 }
448
449 Mdl = Irp->MdlAddress;
450 ok(Mdl != NULL, "Null pointer for MDL!\n");
451 ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
452 ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
453 ok((Mdl->MdlFlags & MDL_IO_PAGE_READ) != 0, "Non paging IO\n");
454 ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
455 }
456
457 if (NT_SUCCESS(Status))
458 {
459 Irp->IoStatus.Information = Length;
460 IoStack->FileObject->CurrentByteOffset.QuadPart = Offset.QuadPart + Length;
461 }
462
464 }
465 else if (IoStack->MajorFunction == IRP_MJ_CLEANUP)
466 {
467 ok_irql(PASSIVE_LEVEL);
468 KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
469 CcUninitializeCacheMap(IoStack->FileObject, &Zero, &CacheUninitEvent);
471 Fcb = IoStack->FileObject->FsContext;
472 ExFreePoolWithTag(Fcb, 'FwrI');
473 IoStack->FileObject->FsContext = NULL;
475 }
476
477 if (Status == STATUS_PENDING)
478 {
482 }
483 else
484 {
485 Irp->IoStatus.Status = Status;
487 }
488
489 return Status;
490}
#define PAGED_CODE()
VOID NTAPI ReleaseFromReadAhead(_In_ PVOID Context)
static PDEVICE_OBJECT TestDeviceObject
static PFILE_OBJECT TestFileObject
static FAST_IO_DISPATCH TestFastIoDispatch
struct _TEST_FCB TEST_FCB
BOOLEAN NTAPI AcquireForReadAhead(_In_ PVOID Context, _In_ BOOLEAN Wait)
static BOOLEAN InBehaviourTest
struct _TEST_FCB * PTEST_FCB
VOID TestUnload(_In_ PDRIVER_OBJECT DriverObject)
#define ok_read_not_called()
static void reset_read(void)
ULONG ReadLength
static PVOID MapAndLockUserBuffer(_In_ _Out_ PIRP Irp, _In_ ULONG BufferLength)
static CACHE_MANAGER_CALLBACKS Callbacks
static BOOLEAN NTAPI FastIoRead(_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ BOOLEAN Wait, _In_ ULONG LockKey, _Out_ PVOID Buffer, _Out_ PIO_STATUS_BLOCK IoStatus, _In_ PDEVICE_OBJECT DeviceObject)
LARGE_INTEGER ReadOffset
VOID NTAPI ReleaseFromLazyWrite(_In_ PVOID Context)
BOOLEAN ReadCalledNonCached
#define ok_read_called(_Offset, _Length)
NTSTATUS TestEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PCUNICODE_STRING RegistryPath, _Out_ PCWSTR *DeviceName, _Inout_ INT *Flags)
BOOLEAN NTAPI AcquireForLazyWrite(_In_ PVOID Context, _In_ BOOLEAN Wait)
static KMT_IRP_HANDLER TestIrpHandler
unsigned char BOOLEAN
#define ok_eq_pointer(value, expected)
Definition: apitest.h:59
#define ok_eq_char(value, expected)
Definition: apitest.h:66
#define ok_eq_hex(value, expected)
Definition: apitest.h:77
#define ok_bool_false(value, desc)
Definition: apitest.h:79
#define ok_bool_true(value, desc)
Definition: apitest.h:78
#define ok_eq_ulongptr(value, expected)
Definition: apitest.h:71
#define ok(value,...)
Definition: atltest.h:57
LONG NTSTATUS
Definition: precomp.h:26
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:160
_In_ PFCB Fcb
Definition: cdprocs.h:159
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ULONG_PTR
Definition: config.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
Definition: string_lib.cpp:31
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define NonPagedPool
Definition: env_spec_w32.h:307
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2665
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
Definition: fatprocs.h:418
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
@ FastIoIsNotPossible
Definition: fsrtltypes.h:240
VOID NTAPI CcInitializeCacheMap(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes, IN BOOLEAN PinAccess, IN PCACHE_MANAGER_CALLBACKS Callbacks, IN PVOID LazyWriteContext)
Definition: fssup.c:195
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
Definition: fssup.c:286
#define IoFreeMdl
Definition: fxmdl.h:89
#define IoAllocateMdl
Definition: fxmdl.h:88
Status
Definition: gdiplustypes.h:25
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:599
IoMarkIrpPending(Irp)
#define KmtStartSeh()
Definition: kmt_test.h:282
#define KmtEndSeh(ExpectedStatus)
Definition: kmt_test.h:288
NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
Definition: mdlsup.c:931
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
@ NormalPagePriority
Definition: imports.h:56
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
Definition: mxum.h:159
#define KernelMode
Definition: asm.h:34
#define RTL_CONSTANT_LARGE_INTEGER(quad_part)
Definition: rtltypes.h:418
#define FILE_OPENED
Definition: nt_native.h:769
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define MAXLONGLONG
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
@ NotificationEvent
BOOLEAN NTAPI CcCopyRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus)
Definition: copysup.c:43
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define L(x)
Definition: ntvdm.h:50
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
KMT_TESTFUNC Test_CcCopyRead
Definition: testlist.c:9
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
PFAST_IO_READ FastIoRead
Definition: iotypes.h:1735
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: ntfs.h:518
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:925
PFILE_OBJECT FileObject
Definition: ntfs.h:520
BOOLEAN BigFile
SECTION_OBJECT_POINTERS SectionObjectPointers
FAST_MUTEX HeaderMutex
FSRTL_ADVANCED_FCB_HEADER Header
#define LL
Definition: tui.h:167
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define MAXULONG
Definition: typedefs.h:251
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define NTAPI
Definition: typedefs.h:36
int32_t INT
Definition: typedefs.h:58
uint16_t * PUSHORT
Definition: typedefs.h:56
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_USER_BUFFER
Definition: udferr_usr.h:166
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET ReadOffset
Definition: wdfusb.h:2003
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
FAST_MUTEX
Definition: extypes.h:17
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_PAGING_IO
* PFILE_OBJECT
Definition: iotypes.h:1998
#define IRP_NOCACHE
#define IRP_MJ_CLEANUP
@ Executive
Definition: ketypes.h:415
@ IoWriteAccess
Definition: ketypes.h:864
#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority)
#define MDL_PAGES_LOCKED
Definition: mmtypes.h:19
#define MDL_IO_PAGE_READ
Definition: mmtypes.h:24
#define MDL_SOURCE_IS_NONPAGED_POOL
Definition: mmtypes.h:20
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175