ReactOS 0.4.15-dev-7711-g5627da4
CcSetFileSizes_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 CcSetFileSizes function
5 * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
6 */
7
8#include <kmt_test.h>
9
10#define NDEBUG
11#include <debug.h>
12
13#define IOCTL_START_TEST 1
14#define IOCTL_FINISH_TEST 2
15
16typedef struct _TEST_FCB
17{
22
23static ULONG TestTestId = -1;
26static KMT_IRP_HANDLER TestIrpHandler;
27static KMT_MESSAGE_HANDLER TestMessageHandler;
33
40{
42
43 PAGED_CODE();
44
46
47 *DeviceName = L"CcSetFileSizes";
48 *Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
49 TESTENTRY_BUFFERED_IO_DEVICE |
50 TESTENTRY_NO_READONLY_DEVICE;
51
55
56 return Status;
57}
58
59VOID
62{
63 PAGED_CODE();
64}
65
71{
72 return TRUE;
73}
74
75VOID
79{
80 return;
81}
82
88{
89 return TRUE;
90}
91
92VOID
96{
97 return;
98}
99
105};
106
111};
112
113static
114PVOID
118{
119 PMDL Mdl;
120
121 if (Irp->MdlAddress == NULL)
122 {
123 Mdl = IoAllocateMdl(Irp->UserBuffer, BufferLength, FALSE, FALSE, Irp);
124 if (Mdl == NULL)
125 {
126 return NULL;
127 }
128
130 {
131 MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoWriteAccess);
132 }
134 {
135 IoFreeMdl(Mdl);
136 Irp->MdlAddress = NULL;
137 _SEH2_YIELD(return NULL);
138 }
139 _SEH2_END;
140 }
141
143}
144
145static
146VOID
148 ULONG TestId,
150{
151 PVOID Bcb;
152 BOOLEAN Ret;
157
161
164 TestTestId = TestId;
166 if (!skip(TestFileObject != NULL, "Failed to allocate FO\n"))
167 {
169 if (!skip(Fcb != NULL, "ExAllocatePool failed\n"))
170 {
171 RtlZeroMemory(Fcb, sizeof(TEST_FCB));
172 ExInitializeFastMutex(&Fcb->HeaderMutex);
173 FsRtlSetupAdvancedHeader(&Fcb->Header, &Fcb->HeaderMutex);
174
175 TestFileObject->FsContext = Fcb;
176 TestFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
177 Fcb->Header.AllocationSize.QuadPart = VACB_MAPPING_GRANULARITY;
178 Fcb->Header.FileSize.QuadPart = VACB_MAPPING_GRANULARITY - PAGE_SIZE;
179 Fcb->Header.ValidDataLength.QuadPart = VACB_MAPPING_GRANULARITY - PAGE_SIZE;
180
181 if ((TestId > 1 && TestId < 4) || TestId >= 5)
182 {
183 Fcb->Header.AllocationSize.QuadPart = VACB_MAPPING_GRANULARITY - PAGE_SIZE;
184 }
185
186 KmtStartSeh();
189
190 if (!skip(CcIsFileCached(TestFileObject) == TRUE, "CcInitializeCacheMap failed\n"))
191 {
192 trace("Starting test: %d\n", TestId);
193
194 if (TestId == 0 || TestId == 2)
195 {
196 Offset.QuadPart = 0;
197 KmtStartSeh();
200
201 if (!skip(Ret == TRUE, "CcMapData failed\n"))
202 {
203 ok_eq_ulong(Buffer[(VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
205 }
206
207 KmtStartSeh();
210
211 Fcb->Header.AllocationSize.QuadPart = VACB_MAPPING_GRANULARITY;
212 Fcb->Header.FileSize.QuadPart = VACB_MAPPING_GRANULARITY;
213
214 Offset.QuadPart = 0;
215 KmtStartSeh();
218
219 if (!skip(Ret == TRUE, "CcMapData failed\n"))
220 {
221 ok_eq_ulong(Buffer[(VACB_MAPPING_GRANULARITY - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
222
224 }
225 }
226 else if (TestId == 1 || TestId == 3)
227 {
229 if (!skip(Buffer != NULL, "ExAllocatePool failed\n"))
230 {
231 Ret = FALSE;
233
234 KmtStartSeh();
237
238 ok_eq_ulong(Buffer[(PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
239
240 KmtStartSeh();
243
244 Fcb->Header.AllocationSize.QuadPart = VACB_MAPPING_GRANULARITY;
245 Fcb->Header.FileSize.QuadPart = VACB_MAPPING_GRANULARITY;
247
249
250 KmtStartSeh();
253
254 ok_eq_ulong(Buffer[(PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
255
257 }
258 }
259 else if (TestId == 4 || TestId == 5)
260 {
261 /* Kill lazy writer */
263
264 Offset.QuadPart = 0;
265 KmtStartSeh();
268
269 if (!skip(Ret == TRUE, "CcPinRead failed\n"))
270 {
271 LARGE_INTEGER Flushed;
272
273 ok_eq_ulong(Buffer[(VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
274 Buffer[(VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)] = 0xDADADADA;
275
279
280 ok_bool_false(TestWritten, "Dirty VACB has been unexpectedly written!\n");
281
283 KmtStartSeh();
287
288 ok_bool_false(TestWritten, "Dirty VACB has been unexpectedly written!\n");
289
290 Fcb->Header.AllocationSize.QuadPart = VACB_MAPPING_GRANULARITY;
291 Fcb->Header.FileSize.QuadPart = VACB_MAPPING_GRANULARITY;
292
293 Flushed = CcGetFlushedValidData(TestFileObject->SectionObjectPointer, FALSE);
294 ok(Flushed.QuadPart == 0, "Flushed: %I64d\n", Flushed.QuadPart);
295
296 TestUnpin = TRUE;
299
300 ok_bool_false(TestWritten, "Dirty VACB has been unexpectedly written!\n");
301
302 Offset.QuadPart = 0;
303 KmtStartSeh();
306
307 if (!skip(Ret == TRUE, "CcMapData failed\n"))
308 {
309 ok_eq_ulong(Buffer[(VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)], 0xDADADADA);
310 ok_eq_ulong(Buffer[(VACB_MAPPING_GRANULARITY - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
311
313
314 ok_bool_false(TestWritten, "Dirty VACB has been unexpectedly written!\n");
315 }
316 }
317 }
318 else if (TestId == 6)
319 {
320 Offset.QuadPart = 0;
321 KmtStartSeh();
324
325 if (!skip(Ret == TRUE, "CcMapData failed\n"))
326 {
327 ok_eq_ulong(Buffer[(VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG)) / sizeof(ULONG)], 0xBABABABA);
328 }
329
330 KmtStartSeh();
333
334 if (Ret == TRUE)
336 }
337 }
338 }
339 }
340}
341
342
343static
344VOID
346 ULONG TestId,
348{
350 CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
351
353 ok_eq_ulong(TestTestId, TestId);
354
355 if (!skip(TestFileObject != NULL, "No test FO\n"))
356 {
358 {
360 KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
361 CcUninitializeCacheMap(TestFileObject, &Zero, &CacheUninitEvent);
364 }
365
366 if (TestFileObject->FsContext != NULL)
367 {
368 ExFreePool(TestFileObject->FsContext);
369 TestFileObject->FsContext = NULL;
370 TestFileObject->SectionObjectPointer = NULL;
371 }
372
374 }
375
378 TestTestId = -1;
379}
380
381
382static
388 _In_ SIZE_T InLength,
389 _Inout_ PSIZE_T OutLength)
390{
392
394
395 switch (ControlCode)
396 {
397 case IOCTL_START_TEST:
398 ok_eq_ulong((ULONG)InLength, sizeof(ULONG));
400 break;
401
403 ok_eq_ulong((ULONG)InLength, sizeof(ULONG));
405 break;
406
407 default:
409 break;
410 }
411
413
414 return Status;
415}
416
417static
421 _In_ PIRP Irp,
422 _In_ PIO_STACK_LOCATION IoStack)
423{
425
426 PAGED_CODE();
427
428 DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
429 ASSERT(IoStack->MajorFunction == IRP_MJ_READ ||
430 IoStack->MajorFunction == IRP_MJ_WRITE);
431
433
435 Irp->IoStatus.Information = 0;
436
437 if (IoStack->MajorFunction == IRP_MJ_READ)
438 {
439 PMDL Mdl;
443 PVOID Buffer, OrigBuffer;
444
445 Offset = IoStack->Parameters.Read.ByteOffset;
446 Length = IoStack->Parameters.Read.Length;
447 Fcb = IoStack->FileObject->FsContext;
448
450 ok_eq_pointer(IoStack->FileObject, TestFileObject);
451 ok(Fcb != NULL, "Null FCB\n");
452
453 ok(FlagOn(Irp->Flags, IRP_NOCACHE), "Not coming from Cc\n");
454
455 ok_irql(APC_LEVEL);
456 ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart);
457 ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
458
459 ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
460 OrigBuffer = Buffer = MapAndLockUserBuffer(Irp, Length);
461 ok(Buffer != NULL, "Null pointer!\n");
462 if (Buffer == NULL)
463 {
465 goto Exit;
466 }
467
468 if (Offset.QuadPart < Fcb->Header.FileSize.QuadPart)
469 {
470 RtlFillMemory(Buffer, min(Length, Fcb->Header.FileSize.QuadPart - Offset.QuadPart), 0xBA);
471 Buffer = (PVOID)((ULONG_PTR)Buffer + (ULONG_PTR)min(Length, Fcb->Header.FileSize.QuadPart - Offset.QuadPart));
472
473 if (Length > (Fcb->Header.FileSize.QuadPart - Offset.QuadPart))
474 {
475 RtlFillMemory(Buffer, Length - (Fcb->Header.FileSize.QuadPart - Offset.QuadPart), 0xBD);
476 }
477 }
478 else
479 {
481 }
482
483 if ((TestTestId == 4 || TestTestId == 5) && TestWritten &&
484 Offset.QuadPart <= VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG) &&
486 {
487 Buffer = (PVOID)((ULONG_PTR)OrigBuffer + (VACB_MAPPING_GRANULARITY - PAGE_SIZE - sizeof(ULONG)));
488 RtlFillMemory(Buffer, sizeof(ULONG), 0xDA);
489 }
490
492
493 Mdl = Irp->MdlAddress;
494 ok(Mdl != NULL, "Null pointer for MDL!\n");
495 ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
496 ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
497 ok((Mdl->MdlFlags & MDL_IO_PAGE_READ) != 0, "Non paging IO\n");
498 ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
499
500 Irp->IoStatus.Information = Length;
501 }
502 else if (IoStack->MajorFunction == IRP_MJ_WRITE)
503 {
504 PMDL Mdl;
508
509 Offset = IoStack->Parameters.Write.ByteOffset;
510 Length = IoStack->Parameters.Write.Length;
511
512 ok((TestTestId == 4 || TestTestId == 5), "Unexpected test id: %d\n", TestTestId);
514 ok_eq_pointer(IoStack->FileObject, TestFileObject);
515
516 ok_bool_false(TestUnpin, "Write triggered while unpinning!\n");
517 ok_bool_false(TestSizing, "Write triggered while sizing!\n");
518 ok_bool_false(TestDirtying, "Write triggered while dirtying!\n");
519 ok_bool_true(TestUncaching, "Write not triggered while uncaching!\n");
520
521 ok(FlagOn(Irp->Flags, IRP_NOCACHE), "Not coming from Cc\n");
522
523 ok_irql(PASSIVE_LEVEL);
524 ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart);
525 ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
526
528 ok(Buffer != NULL, "Null pointer!\n");
529
530 Mdl = Irp->MdlAddress;
531 ok(Mdl != NULL, "Null pointer for MDL!\n");
532 ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
533 ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
534 ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
535
538 Irp->IoStatus.Information = Length;
539 }
540
541 if (Status == STATUS_PENDING)
542 {
546 }
547 else
548 {
549 Irp->IoStatus.Status = Status;
551 }
552
553Exit:
555
556 return Status;
557}
#define PAGED_CODE()
VOID NTAPI ReleaseFromReadAhead(_In_ PVOID Context)
static PDEVICE_OBJECT TestDeviceObject
static PFILE_OBJECT TestFileObject
#define IOCTL_FINISH_TEST
static VOID PerformTest(ULONG TestId, PDEVICE_OBJECT DeviceObject)
struct _TEST_FCB TEST_FCB
static ULONG TestTestId
BOOLEAN NTAPI AcquireForReadAhead(_In_ PVOID Context, _In_ BOOLEAN Wait)
static VOID CleanupTest(ULONG TestId, PDEVICE_OBJECT DeviceObject)
struct _TEST_FCB * PTEST_FCB
VOID TestUnload(_In_ PDRIVER_OBJECT DriverObject)
#define IOCTL_START_TEST
static BOOLEAN TestUncaching
static PVOID MapAndLockUserBuffer(_In_ _Out_ PIRP Irp, _In_ ULONG BufferLength)
static BOOLEAN TestDirtying
static BOOLEAN TestSizing
static CACHE_MANAGER_CALLBACKS Callbacks
static KMT_MESSAGE_HANDLER TestMessageHandler
VOID NTAPI ReleaseFromLazyWrite(_In_ PVOID Context)
static BOOLEAN TestUnpin
NTSTATUS TestEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PCUNICODE_STRING RegistryPath, _Out_ PCWSTR *DeviceName, _Inout_ INT *Flags)
static BOOLEAN TestWritten
BOOLEAN NTAPI AcquireForLazyWrite(_In_ PVOID Context, _In_ BOOLEAN Wait)
static KMT_IRP_HANDLER TestIrpHandler
static CC_FILE_SIZES NewFileSizes
unsigned char BOOLEAN
#define ok_eq_pointer(value, expected)
Definition: apitest.h:58
#define ok_eq_ulong(value, expected)
Definition: apitest.h:62
#define ok_bool_false(value, desc)
Definition: apitest.h:78
#define ok_bool_true(value, desc)
Definition: apitest.h:77
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
LONG NTSTATUS
Definition: precomp.h:26
LARGE_INTEGER NTAPI CcGetFlushedValidData(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN BOOLEAN CcInternalCaller)
Definition: cachesub.c:130
VOID NTAPI CcSetDirtyPinnedData(IN PVOID BcbVoid, IN OPTIONAL PLARGE_INTEGER Lsn)
Definition: cachesub.c:121
#define CcIsFileCached(FO)
_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 ULONG_PTR
Definition: config.h:101
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#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 ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:414
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
Definition: fatprocs.h:418
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
Definition: fssup.c:356
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 KmtRegisterMessageHandler(IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler)
NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
VOID NTAPI CcSetAdditionalCacheAttributes(IN PFILE_OBJECT FileObject, IN BOOLEAN DisableReadAhead, IN BOOLEAN DisableWriteBehind)
Definition: logsup.c:22
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
@ NormalPagePriority
Definition: imports.h:56
#define min(a, b)
Definition: monoChain.cc:55
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
__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 UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
@ NotificationEvent
#define MAP_WAIT
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
PFILE_OBJECT NTAPI IoCreateStreamFileObject(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
Definition: file.c:3187
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define L(x)
Definition: ntvdm.h:50
VOID NTAPI CcUnpinData(IN PVOID Bcb)
Definition: pinsup.c:955
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pinsup.c:802
BOOLEAN NTAPI CcMapData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *BcbResult, OUT PVOID *Buffer)
Definition: pinsup.c:694
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:162
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
static void Exit(void)
Definition: sock.c:1330
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: ntfs.h:518
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:925
PFILE_OBJECT FileObject
Definition: ntfs.h:520
SECTION_OBJECT_POINTERS SectionObjectPointers
FAST_MUTEX HeaderMutex
FSRTL_ADVANCED_FCB_HEADER Header
#define LL
Definition: tui.h:150
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
int64_t LONGLONG
Definition: typedefs.h:68
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#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_UNSUCCESSFUL
Definition: udferr_usr.h:132
LONGLONG QuadPart
Definition: typedefs.h:114
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_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
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define VACB_MAPPING_GRANULARITY
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
@ 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
#define ObDereferenceObject
Definition: obfuncs.h:203