ReactOS 0.4.16-dev-329-g9223134
CcCopyWrite_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 CcCopyWrite 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
48static
60{
62 return FALSE;
63}
64
71{
73
74 PAGED_CODE();
75
77
78 *DeviceName = L"CcCopyWrite";
79 *Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
80 TESTENTRY_BUFFERED_IO_DEVICE |
81 TESTENTRY_NO_READONLY_DEVICE;
82
88
91 DriverObject->FastIoDispatch = &TestFastIoDispatch;
92
93
94 return Status;
95}
96
97VOID
100{
101 PAGED_CODE();
102}
103
105NTAPI
109{
110 return TRUE;
111}
112
113VOID
114NTAPI
117{
118 return;
119}
120
122NTAPI
126{
127 return TRUE;
128}
129
130VOID
131NTAPI
134{
135 return;
136}
137
143};
144
145static
146PVOID
150{
151 PMDL Mdl;
152
153 if (Irp->MdlAddress == NULL)
154 {
155 Mdl = IoAllocateMdl(Irp->UserBuffer, BufferLength, FALSE, FALSE, Irp);
156 if (Mdl == NULL)
157 {
158 return NULL;
159 }
160
162 {
163 MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoWriteAccess);
164 }
166 {
167 IoFreeMdl(Mdl);
168 Irp->MdlAddress = NULL;
169 _SEH2_YIELD(return NULL);
170 }
171 _SEH2_END;
172 }
173
175}
176
177static
178void
180{
182 ReadOffset.QuadPart = MAXLONGLONG;
184}
185
186#define ok_read_called(_Offset, _Length) do { \
187 ok(ReadCalled, "CcCopyWrite should have triggerred a read.\n"); \
188 ok_eq_longlong(ReadOffset.QuadPart, _Offset); \
189 ok_eq_ulong(ReadLength, _Length); \
190}while(0)
191
192#define ok_read_not_called() ok(!ReadCalled, "CcCopyWrite shouldn't have triggered a read.\n")
193
194static
195VOID
197{
198
199 BOOLEAN Ret;
201 CHAR Buffer[10];
202
203 memset(Buffer, 0xAC, 10);
204
205 /* Test bogus file object & file offset */
206 Ret = 'x';
208 Ret = CcCopyWrite(FileObject, NULL, 0, FALSE, NULL);
210 ok_eq_char(Ret, 'x');
211
212 Ret = 'x';
213 Offset.QuadPart = 0;
215 Ret = CcCopyWrite(NULL, &Offset, 10, FALSE, Buffer);
217 ok_eq_char(Ret, 'x');
218
219 /* What happens on invalid buffer */
220 Ret = 'x';
221 Offset.QuadPart = 0;
222 reset_read();
224 Ret = CcCopyWrite(FileObject, &Offset, 0, TRUE, NULL);
226 ok_bool_true(Ret, "CcCopyWrite(0, NULL) should succeed\n");
227 /* When there is nothing to write, there is no reason to read */
229
230 Ret = 'x';
231 Offset.QuadPart = 0;
232 reset_read();
234 Ret = CcCopyWrite(FileObject, &Offset, 10, TRUE, NULL);
236 ok_eq_char(Ret, 'x');
237 /* This raises an exception, but it actually triggered a read */
239
240 /* So this one succeeds, as the page is now resident */
241 Ret = 'x';
242 Offset.QuadPart = 0;
243 reset_read();
247 ok_bool_true(Ret, "CcCopyWrite should succeed\n");
248 /* But there was no read triggered, as the page is already resident. */
250
251 /* But this one doesn't */
252 Ret = 'x';
253 Offset.QuadPart = PAGE_SIZE;
254 reset_read();
258 ok_bool_false(Ret, "CcCopyWrite should fail\n");
259 /* But it triggered a read anyway. */
261
262 /* Of course, waiting for it succeeds and triggers the read */
263 Ret = 'x';
264 Offset.QuadPart = PAGE_SIZE * 2;
265 reset_read();
267 Ret = CcCopyWrite(FileObject, &Offset, 10, TRUE, Buffer);
269 ok_bool_true(Ret, "CcCopyWrite should succeed\n");
271}
272
273static
277 _In_ PIRP Irp,
278 _In_ PIO_STACK_LOCATION IoStack)
279{
283 CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
284
285 PAGED_CODE();
286
287 DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
288 ASSERT(IoStack->MajorFunction == IRP_MJ_CLEANUP ||
289 IoStack->MajorFunction == IRP_MJ_CREATE ||
290 IoStack->MajorFunction == IRP_MJ_READ ||
291 IoStack->MajorFunction == IRP_MJ_WRITE ||
292 IoStack->MajorFunction == IRP_MJ_FLUSH_BUFFERS);
293
295 Irp->IoStatus.Information = 0;
296
297 if (IoStack->MajorFunction == IRP_MJ_CREATE)
298 {
299 ok_irql(PASSIVE_LEVEL);
300
301 if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR))
302 {
304 TestFileObject = IoStack->FileObject;
305 }
306 Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(*Fcb), 'FwrI');
307 RtlZeroMemory(Fcb, sizeof(*Fcb));
308 ExInitializeFastMutex(&Fcb->HeaderMutex);
309 FsRtlSetupAdvancedHeader(&Fcb->Header, &Fcb->HeaderMutex);
310 if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
311 IoStack->FileObject->FileName.Buffer[1] == 'B')
312 {
313 Fcb->Header.AllocationSize.QuadPart = 1000000;
314 Fcb->Header.FileSize.QuadPart = 1000000;
315 Fcb->Header.ValidDataLength.QuadPart = 1000000;
316 }
317 else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
318 IoStack->FileObject->FileName.Buffer[1] == 'S')
319 {
320 Fcb->Header.AllocationSize.QuadPart = 512;
321 Fcb->Header.FileSize.QuadPart = 512;
322 Fcb->Header.ValidDataLength.QuadPart = 512;
323 }
324 else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
325 IoStack->FileObject->FileName.Buffer[1] == 'V')
326 {
327 Fcb->Header.AllocationSize.QuadPart = 62;
328 Fcb->Header.FileSize.QuadPart = 62;
329 Fcb->Header.ValidDataLength.QuadPart = 62;
330 }
331 else
332 {
333 Fcb->Header.AllocationSize.QuadPart = 1004;
334 Fcb->Header.FileSize.QuadPart = 1004;
335 Fcb->Header.ValidDataLength.QuadPart = 1004;
336 }
337 Fcb->Header.IsFastIoPossible = FastIoIsNotPossible;
338 IoStack->FileObject->FsContext = Fcb;
339 IoStack->FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
340
341 CcInitializeCacheMap(IoStack->FileObject,
342 (PCC_FILE_SIZES)&Fcb->Header.AllocationSize,
343 FALSE, &Callbacks, NULL);
344
345 Irp->IoStatus.Information = FILE_OPENED;
347 }
348 else if (IoStack->MajorFunction == IRP_MJ_READ)
349 {
350 PMDL Mdl;
354
355 Offset = IoStack->Parameters.Read.ByteOffset;
356 Length = IoStack->Parameters.Read.Length;
357 Fcb = IoStack->FileObject->FsContext;
358
360 ok_eq_pointer(IoStack->FileObject, TestFileObject);
361
362 ok(BooleanFlagOn(Irp->Flags, IRP_NOCACHE), "IRP not coming from Cc!\n");
363 ok_irql(APC_LEVEL);
364 ok((Offset.QuadPart == 0 || Offset.QuadPart == 4096 || Offset.QuadPart == 8192), "Unexpected offset: %I64i\n", Offset.QuadPart);
365 ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
366
370
371 ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
373 ok(Buffer != NULL, "Null pointer!\n");
375
377
378 Mdl = Irp->MdlAddress;
379 ok(Mdl != NULL, "Null pointer for MDL!\n");
380 ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
381 ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
382 ok((Mdl->MdlFlags & MDL_IO_PAGE_READ) != 0, "Non paging IO\n");
383 ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
384
385 Irp->IoStatus.Information = Length;
386 IoStack->FileObject->CurrentByteOffset.QuadPart = Offset.QuadPart + Length;
387 }
388 else if (IoStack->MajorFunction == IRP_MJ_WRITE)
389 {
390 PMDL Mdl;
394 static const UNICODE_STRING BehaviourTestFileName = RTL_CONSTANT_STRING(L"\\BehaviourTestFile");
395
396 Offset = IoStack->Parameters.Read.ByteOffset;
397 Length = IoStack->Parameters.Read.Length;
398 Fcb = IoStack->FileObject->FsContext;
399
400 ok_bool_false(InBehaviourTest, "Shouldn't trigger write from CcCopyWrite\n");
401 /* Check special file name */
402 InBehaviourTest = RtlCompareUnicodeString(&IoStack->FileObject->FileName, &BehaviourTestFileName, TRUE) == 0;
403
404 if (!FlagOn(Irp->Flags, IRP_NOCACHE))
405 {
406 BOOLEAN Ret;
407
408 ok_irql(PASSIVE_LEVEL);
409
410 if (InBehaviourTest)
411 {
412 Test_CcCopyWrite(IoStack->FileObject);
413 Status = Irp->IoStatus.Status = STATUS_SUCCESS;
414 }
415 else
416 {
417 Buffer = Irp->AssociatedIrp.SystemBuffer;
418 ok(Buffer != NULL, "Null pointer!\n");
419
420 Fcb->WriteLength = Length;
421
423 {
424 Ret = CcCopyWrite(IoStack->FileObject, &Offset, Length, TRUE, Buffer);
425 ok_bool_true(Ret, "CcCopyWrite");
426 }
428 {
429 Irp->IoStatus.Status = _SEH2_GetExceptionCode();
430 }
431 _SEH2_END;
432
433 Status = Irp->IoStatus.Status;
434 }
435 }
436 else
437 {
438 ok_irql(PASSIVE_LEVEL);
439
440 if (InBehaviourTest)
441 {
442 /* We wrote only to the 1st and 3rd page */
443 ok((Offset.QuadPart == 0) || (Offset.QuadPart == PAGE_SIZE * 2), "Expected a non-cached write on 1st or 3rd page\n");
444 /* We wrote that much with CcCopyWrite */
446 }
447 else
448 {
449 ok((Offset.QuadPart == 0 || Offset.QuadPart == 4096), "Unexpected offset: %I64i\n", Offset.QuadPart);
450 ok_eq_ulong(Length, ROUND_TO_PAGES(Fcb->WriteLength));
451 }
452
453 ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
455 ok(Buffer != NULL, "Null pointer!\n");
456
458
459 Mdl = Irp->MdlAddress;
460 ok(Mdl != NULL, "Null pointer for MDL!\n");
461 ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
462 ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
463 ok((Mdl->MdlFlags & MDL_IO_PAGE_READ) == 0, "MDL for read paging IO\n");
464 ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
465 }
466
468 }
469 else if (IoStack->MajorFunction == IRP_MJ_FLUSH_BUFFERS)
470 {
472
473 Fcb = IoStack->FileObject->FsContext;
475
477 }
478 else if (IoStack->MajorFunction == IRP_MJ_CLEANUP)
479 {
480 ok_irql(PASSIVE_LEVEL);
481 KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
482 CcUninitializeCacheMap(IoStack->FileObject, &Zero, &CacheUninitEvent);
484 Fcb = IoStack->FileObject->FsContext;
485 ExFreePoolWithTag(Fcb, 'FwrI');
486 IoStack->FileObject->FsContext = NULL;
488 }
489
490 if (Status == STATUS_PENDING)
491 {
495 }
496 else
497 {
498 Irp->IoStatus.Status = Status;
500 }
501
502 return Status;
503}
#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 BOOLEAN NTAPI FastIoWrite(_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)
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)
#define ok_read_called(_Offset, _Length)
BOOLEAN ReadCalled
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_ulong(value, expected)
Definition: apitest.h:63
#define ok_bool_false(value, desc)
Definition: apitest.h:79
#define ok_bool_true(value, desc)
Definition: apitest.h:78
#define ok(value,...)
Definition: atltest.h:57
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI CcFlushCache(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, OUT OPTIONAL PIO_STATUS_BLOCK IoStatus)
Definition: cachesub.c:222
_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 STATUS_PENDING
Definition: d3dkmdt.h:43
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#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
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2666
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
Definition: fatprocs.h:419
@ 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 RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:599
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
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:54
__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 _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define FILE_OPENED
Definition: nt_native.h:769
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#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 CcCopyWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN PVOID Buffer)
Definition: copysup.c:129
#define IoCompleteRequest
Definition: irp.c:1240
#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_END
Definition: pseh2_64.h:155
#define _SEH2_TRY
Definition: pseh2_64.h:55
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
KMT_TESTFUNC Test_CcCopyWrite
Definition: testlist.c:10
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
PFAST_IO_WRITE FastIoWrite
Definition: iotypes.h:1736
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
ULONG WriteLength
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
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
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_MJ_FLUSH_BUFFERS
#define IRP_NOCACHE
#define IRP_MJ_CLEANUP
@ Executive
Definition: ketypes.h:415
@ IoWriteAccess
Definition: ketypes.h:864
#define ROUND_TO_PAGES(Size)
#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