ReactOS 0.4.15-dev-7906-g1b85a5f
CcPinMappedData_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 CcPinMappedData 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
23typedef struct _TEST_CONTEXT
24{
25 PVOID Bcb;
29
30static ULONG TestTestId = -1;
33static KMT_IRP_HANDLER TestIrpHandler;
34static KMT_MESSAGE_HANDLER TestMessageHandler;
35
42{
44
45 PAGED_CODE();
46
48
49 *DeviceName = L"CcPinMappedData";
50 *Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
51 TESTENTRY_BUFFERED_IO_DEVICE |
52 TESTENTRY_NO_READONLY_DEVICE;
53
56
57
58 return Status;
59}
60
61VOID
64{
65 PAGED_CODE();
66}
67
73{
74 return TRUE;
75}
76
77VOID
81{
82 return;
83}
84
90{
91 return TRUE;
92}
93
94VOID
98{
99 return;
100}
101
107};
108
110 RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000), // .AllocationSize
111 RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000), // .FileSize
112 RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000) // .ValidDataLength
113};
114
115static
116PVOID
120{
121 PMDL Mdl;
122
123 if (Irp->MdlAddress == NULL)
124 {
125 Mdl = IoAllocateMdl(Irp->UserBuffer, BufferLength, FALSE, FALSE, Irp);
126 if (Mdl == NULL)
127 {
128 return NULL;
129 }
130
132 {
133 MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoWriteAccess);
134 }
136 {
137 IoFreeMdl(Mdl);
138 Irp->MdlAddress = NULL;
139 _SEH2_YIELD(return NULL);
140 }
141 _SEH2_END;
142 }
143
145}
146
147static
148VOID
149NTAPI
151{
152 BOOLEAN Ret;
154 PVOID Bcb, PinBcb;
156 PTEST_CONTEXT TestContext;
157
158 ok(TestFileObject != NULL, "Called in invalid context!\n");
160
161 TestContext = Context;
162 ok(TestContext != NULL, "Called in invalid context!\n");
163 ok(TestContext->Bcb != NULL, "Called in invalid context!\n");
164 ok(TestContext->Buffer != NULL, "Called in invalid context!\n");
165 ok(TestContext->Length != 0, "Called in invalid context!\n");
166
167 Ret = FALSE;
168 Offset.QuadPart = 0;
169
170 KmtStartSeh();
171 Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
173
174 if (!skip(Ret == TRUE, "CcMapData failed\n"))
175 {
176 ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
177 ok_eq_pointer(Buffer, TestContext->Buffer);
178
179 Ret = FALSE;
180 PinBcb = Bcb;
181
182 KmtStartSeh();
183 Ret = CcPinMappedData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, 0, &PinBcb);
185
186 if (!skip(Ret == TRUE, "CcPinMappedData failed\n"))
187 {
188 ok(Bcb != PinBcb, "Returned same BCB!\n");
189 ok_eq_pointer(PinBcb, TestContext->Bcb);
190
191 Bcb = PinBcb;
192 }
193
195 }
196}
197
198static
199VOID
200NTAPI
202{
203 BOOLEAN Ret;
205 PVOID Bcb, PinBcb;
207 PTEST_CONTEXT TestContext;
208
209 ok(TestFileObject != NULL, "Called in invalid context!\n");
211
212 TestContext = Context;
213 ok(TestContext != NULL, "Called in invalid context!\n");
214 ok(TestContext->Bcb != NULL, "Called in invalid context!\n");
215 ok(TestContext->Buffer != NULL, "Called in invalid context!\n");
216 ok(TestContext->Length != 0, "Called in invalid context!\n");
217
218 Ret = FALSE;
219 Offset.QuadPart = 0;
220
221 KmtStartSeh();
222 Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
224
225 if (!skip(Ret == TRUE, "CcMapData failed\n"))
226 {
227 ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
228 ok_eq_pointer(Buffer, TestContext->Buffer);
229
230 Ret = FALSE;
231 PinBcb = Bcb;
232
233 KmtStartSeh();
236
237 if (!skip(Ret == FALSE, "CcPinMappedData succeed\n"))
238 {
239 ok_eq_pointer(PinBcb, Bcb);
240
241 Ret = FALSE;
242 PinBcb = Bcb;
243
244 KmtStartSeh();
245 Ret = CcPinMappedData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, 0, &PinBcb);
247
248 if (!skip(Ret == FALSE, "CcPinMappedData succeed\n"))
249 {
250 ok_eq_pointer(PinBcb, Bcb);
251 }
252 else
253 {
254 Bcb = PinBcb;
255 }
256 }
257 else
258 {
259 Bcb = PinBcb;
260 }
261
263 }
264}
265
266static
267VOID
269 ULONG TestId,
271{
272 PVOID Bcb, PinBcb, NewBcb;
273 BOOLEAN Ret;
277
281
283 TestTestId = TestId;
285 if (!skip(TestFileObject != NULL, "Failed to allocate FO\n"))
286 {
288 if (!skip(Fcb != NULL, "ExAllocatePool failed\n"))
289 {
290 RtlZeroMemory(Fcb, sizeof(TEST_FCB));
291 ExInitializeFastMutex(&Fcb->HeaderMutex);
292 FsRtlSetupAdvancedHeader(&Fcb->Header, &Fcb->HeaderMutex);
293
294 TestFileObject->FsContext = Fcb;
295 TestFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
296
297 KmtStartSeh();
300
301 if (!skip(CcIsFileCached(TestFileObject) == TRUE, "CcInitializeCacheMap failed\n"))
302 {
303 if (TestId == 0)
304 {
305 Ret = FALSE;
306 Offset.QuadPart = 0;
307 KmtStartSeh();
310
311 if (!skip(Ret == TRUE, "CcMapData failed\n"))
312 {
313 Ret = FALSE;
314 PinBcb = Bcb;
315 ok_eq_ulong(Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE);
316
317 KmtStartSeh();
320
321 if (!skip(Ret == TRUE, "CcPinMappedData failed\n"))
322 {
323 ok(Bcb != PinBcb, "Returned same BCB!\n");
324 ok(*(PUSHORT)PinBcb == 0x2FD, "Not a BCB: %x\n", *(PUSHORT)PinBcb);
325
326 /* Previous BCB isn't valid anymore! */
327 Bcb = PinBcb;
328 }
329
331 }
332 }
333 else if (TestId == 1)
334 {
335 Ret = FALSE;
336 Offset.QuadPart = 0;
337 KmtStartSeh();
340
341 if (!skip(Ret == TRUE, "CcPinRead failed\n"))
342 {
343 ok(*(PUSHORT)PinBcb == 0x2FD, "Not a BCB: %x\n", *(PUSHORT)PinBcb);
344 ok_eq_ulong(Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE);
345
346 Ret = FALSE;
347 KmtStartSeh();
350
351 if (!skip(Ret == TRUE, "CcMapData failed\n"))
352 {
353 ok(Bcb != PinBcb, "Returned same BCB!\n");
354
355 Ret = FALSE;
356 NewBcb = Bcb;
357 KmtStartSeh();
360
361 if (!skip(Ret == TRUE, "CcPinMappedData failed\n"))
362 {
363 ok(Bcb != NewBcb, "Returned same BCB!\n");
364 ok_eq_pointer(NewBcb, PinBcb);
365 ok(*(PUSHORT)NewBcb == 0x2FD, "Not a BCB: %x\n", *(PUSHORT)NewBcb);
366
367 /* Previous BCB isn't valid anymore! */
368 Bcb = NewBcb;
369 }
370
372 }
373
374 CcUnpinData(PinBcb);
375 }
376 }
377 else if (TestId == 2)
378 {
379 PTEST_CONTEXT TestContext;
380
381 TestContext = ExAllocatePool(NonPagedPool, sizeof(TEST_CONTEXT));
382 if (!skip(TestContext != NULL, "ExAllocatePool failed\n"))
383 {
384 Ret = FALSE;
385 Offset.QuadPart = 0;
386 KmtStartSeh();
387 Ret = CcPinRead(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, PIN_WAIT | PIN_EXCLUSIVE, &TestContext->Bcb, (PVOID *)&TestContext->Buffer);
389
390 if (!skip(Ret == TRUE, "CcPinRead failed\n"))
391 {
392 PKTHREAD ThreadHandle;
393
394 ok(*(PUSHORT)TestContext->Bcb == 0x2FD, "Not a BCB: %x\n", *(PUSHORT)TestContext->Bcb);
395 ok_eq_ulong(TestContext->Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE);
396
397 TestContext->Length = FileSizes.FileSize.QuadPart - Offset.QuadPart;
398 ThreadHandle = KmtStartThread(PinInAnotherThreadExclusive, TestContext);
399 KmtFinishThread(ThreadHandle, NULL);
400
401 CcUnpinData(TestContext->Bcb);
402 }
403
404 ExFreePool(TestContext);
405 }
406 }
407 else if (TestId == 3)
408 {
409 Ret = FALSE;
410 Offset.QuadPart = 0;
411 KmtStartSeh();
414
415 if (!skip(Ret == TRUE, "CcMapData failed\n"))
416 {
417 Ret = FALSE;
418 PinBcb = Bcb;
419 ok_eq_ulong(Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE);
420
421 KmtStartSeh();
424
425 if (!skip(Ret == FALSE, "CcPinMappedData succeed\n"))
426 {
427 ok_eq_pointer(Bcb, PinBcb);
428 }
429 else
430 {
431 Bcb = PinBcb;
432 }
433
435 }
436 }
437 else if (TestId == 4)
438 {
439 PTEST_CONTEXT TestContext;
440
441 TestContext = ExAllocatePool(NonPagedPool, sizeof(TEST_CONTEXT));
442 if (!skip(TestContext != NULL, "ExAllocatePool failed\n"))
443 {
444 Ret = FALSE;
445 Offset.QuadPart = 0;
446 KmtStartSeh();
447 Ret = CcPinRead(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, PIN_WAIT, &TestContext->Bcb, (PVOID *)&TestContext->Buffer);
449
450 if (!skip(Ret == TRUE, "CcPinRead failed\n"))
451 {
452 PKTHREAD ThreadHandle;
453
454 ok(*(PUSHORT)TestContext->Bcb == 0x2FD, "Not a BCB: %x\n", *(PUSHORT)TestContext->Bcb);
455 ok_eq_ulong(TestContext->Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE);
456
457 TestContext->Length = FileSizes.FileSize.QuadPart - Offset.QuadPart;
458 ThreadHandle = KmtStartThread(PinInAnotherThread, TestContext);
459 KmtFinishThread(ThreadHandle, NULL);
460
461 CcUnpinData(TestContext->Bcb);
462 }
463
464 ExFreePool(TestContext);
465 }
466 }
467 }
468 }
469 }
470}
471
472
473static
474VOID
476 ULONG TestId,
478{
480 CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
481
483 ok_eq_ulong(TestTestId, TestId);
484
485 if (!skip(TestFileObject != NULL, "No test FO\n"))
486 {
488 {
489 KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
490 CcUninitializeCacheMap(TestFileObject, &Zero, &CacheUninitEvent);
492 }
493
494 if (TestFileObject->FsContext != NULL)
495 {
496 ExFreePool(TestFileObject->FsContext);
497 TestFileObject->FsContext = NULL;
498 TestFileObject->SectionObjectPointer = NULL;
499 }
500
502 }
503
506 TestTestId = -1;
507}
508
509
510static
516 _In_ SIZE_T InLength,
517 _Inout_ PSIZE_T OutLength)
518{
520
522
523 switch (ControlCode)
524 {
525 case IOCTL_START_TEST:
526 ok_eq_ulong((ULONG)InLength, sizeof(ULONG));
528 break;
529
531 ok_eq_ulong((ULONG)InLength, sizeof(ULONG));
533 break;
534
535 default:
537 break;
538 }
539
541
542 return Status;
543}
544
545static
549 _In_ PIRP Irp,
550 _In_ PIO_STACK_LOCATION IoStack)
551{
553
554 PAGED_CODE();
555
556 DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
557 ASSERT(IoStack->MajorFunction == IRP_MJ_READ);
558
560
562 Irp->IoStatus.Information = 0;
563
564 if (IoStack->MajorFunction == IRP_MJ_READ)
565 {
566 PMDL Mdl;
570
571 Offset = IoStack->Parameters.Read.ByteOffset;
572 Length = IoStack->Parameters.Read.Length;
573
575 ok_eq_pointer(IoStack->FileObject, TestFileObject);
576
577 ok(FlagOn(Irp->Flags, IRP_NOCACHE), "Not coming from Cc\n");
578
579 ok_irql(APC_LEVEL);
580 ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart);
581 ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
582
583 ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
585 ok(Buffer != NULL, "Null pointer!\n");
587
589 if (Offset.QuadPart <= 0x3000 && Offset.QuadPart + Length > 0x3000)
590 {
591 *(PULONG)((ULONG_PTR)Buffer + (ULONG_PTR)(0x3000 - Offset.QuadPart)) = 0xDEADBABE;
592 }
593
594 Mdl = Irp->MdlAddress;
595 ok(Mdl != NULL, "Null pointer for MDL!\n");
596 ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
597 ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
598 ok((Mdl->MdlFlags & MDL_IO_PAGE_READ) != 0, "Non paging IO\n");
599 ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
600
601 Irp->IoStatus.Information = Length;
602 }
603
604 if (Status == STATUS_PENDING)
605 {
609 }
610 else
611 {
612 Irp->IoStatus.Status = Status;
614 }
615
617
618 return Status;
619}
#define PAGED_CODE()
struct _TEST_CONTEXT TEST_CONTEXT
VOID NTAPI ReleaseFromReadAhead(_In_ PVOID Context)
static PDEVICE_OBJECT TestDeviceObject
static PFILE_OBJECT TestFileObject
#define IOCTL_FINISH_TEST
static CC_FILE_SIZES FileSizes
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
struct _TEST_CONTEXT * PTEST_CONTEXT
static PVOID MapAndLockUserBuffer(_In_ _Out_ PIRP Irp, _In_ ULONG BufferLength)
static CACHE_MANAGER_CALLBACKS Callbacks
static KMT_MESSAGE_HANDLER TestMessageHandler
VOID NTAPI ReleaseFromLazyWrite(_In_ PVOID Context)
NTSTATUS TestEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PCUNICODE_STRING RegistryPath, _Out_ PCWSTR *DeviceName, _Inout_ INT *Flags)
static VOID NTAPI PinInAnotherThread(IN PVOID Context)
BOOLEAN NTAPI AcquireForLazyWrite(_In_ PVOID Context, _In_ BOOLEAN Wait)
static KMT_IRP_HANDLER TestIrpHandler
static VOID NTAPI PinInAnotherThreadExclusive(IN PVOID Context)
unsigned char BOOLEAN
#define ok_eq_pointer(value, expected)
Definition: apitest.h:59
#define ok_eq_ulong(value, expected)
Definition: apitest.h:63
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
LONG NTSTATUS
Definition: precomp.h:26
#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 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 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
PKTHREAD KmtStartThread(IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext OPTIONAL)
VOID KmtFinishThread(IN PKTHREAD Thread OPTIONAL, IN PKEVENT Event OPTIONAL)
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 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 _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
#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 PIN_EXCLUSIVE
#define PIN_IF_BCB
#define MAP_WAIT
#define PIN_WAIT
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 CcPinMappedData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, IN OUT PVOID *Bcb)
Definition: pinsup.c:774
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 STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
LARGE_INTEGER FileSize
Definition: cctypes.h:16
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: ntfs.h:518
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:925
SECTION_OBJECT_POINTERS SectionObjectPointers
FAST_MUTEX HeaderMutex
FSRTL_ADVANCED_FCB_HEADER Header
#define LL
Definition: tui.h:167
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
ULONG_PTR SIZE_T
Definition: typedefs.h:80
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
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
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
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