ReactOS 0.4.15-dev-7842-g558ab78
IoReadWrite_drv.c File Reference
#include <kmt_test.h>
#include "IoReadWrite.h"
#include <debug.h>
Include dependency graph for IoReadWrite_drv.c:

Go to the source code of this file.

Classes

struct  _TEST_FCB
 

Macros

#define NDEBUG
 

Typedefs

typedef struct _TEST_FCB TEST_FCB
 
typedef struct _TEST_FCBPTEST_FCB
 

Functions

NTSTATUS TestEntry (_In_ PDRIVER_OBJECT DriverObject, _In_ PCUNICODE_STRING RegistryPath, _Out_ PCWSTR *DeviceName, _Inout_ INT *Flags)
 
VOID TestUnload (_In_ PDRIVER_OBJECT DriverObject)
 
static BOOLEAN NTAPI TestAcquireForLazyWrite (_In_ PVOID Context, _In_ BOOLEAN Wait)
 
static VOID NTAPI TestReleaseFromLazyWrite (_In_ PVOID Context)
 
static BOOLEAN NTAPI TestAcquireForReadAhead (_In_ PVOID Context, _In_ BOOLEAN Wait)
 
static VOID NTAPI TestReleaseFromReadAhead (_In_ PVOID Context)
 
static NTSTATUS TestCommonRead (_In_ PVOID Buffer, _In_ ULONG Length, _In_ LONGLONG FileOffset, _In_ ULONG LockKey, _Out_ PIO_STATUS_BLOCK IoStatus)
 
static BOOLEAN NTAPI TestFastIoRead (_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 NTSTATUS TestCommonWrite (_In_ PVOID Buffer, _In_ ULONG Length, _In_ LONGLONG FileOffset, _In_ ULONG LockKey, _Out_ PIO_STATUS_BLOCK IoStatus)
 
static BOOLEAN NTAPI TestFastIoWrite (_In_ PFILE_OBJECT FileObject, _In_ PLARGE_INTEGER FileOffset, _In_ ULONG Length, _In_ BOOLEAN Wait, _In_ ULONG LockKey, _In_ PVOID Buffer, _Out_ PIO_STATUS_BLOCK IoStatus, _In_ PDEVICE_OBJECT DeviceObject)
 
static NTSTATUS TestIrpHandler (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ PIO_STACK_LOCATION IoStack)
 

Variables

static KMT_IRP_HANDLER TestIrpHandler
 
static FAST_IO_READ TestFastIoRead
 
static FAST_IO_WRITE TestFastIoWrite
 
static FAST_IO_DISPATCH TestFastIoDispatch
 
static ULONG TestLastFastReadKey
 
static ULONG TestLastFastWriteKey
 
static PFILE_OBJECT TestFileObject
 
static PDEVICE_OBJECT TestDeviceObject
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file IoReadWrite_drv.c.

Typedef Documentation

◆ PTEST_FCB

◆ TEST_FCB

Function Documentation

◆ TestAcquireForLazyWrite()

static BOOLEAN NTAPI TestAcquireForLazyWrite ( _In_ PVOID  Context,
_In_ BOOLEAN  Wait 
)
static

Definition at line 72 of file IoReadWrite_drv.c.

75{
77 ok(0, "Unexpected call to AcquireForLazyWrite\n");
78 return TRUE;
79}
#define ok_eq_pointer(value, expected)
Definition: apitest.h:58
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120

Referenced by TestIrpHandler().

◆ TestAcquireForReadAhead()

static BOOLEAN NTAPI TestAcquireForReadAhead ( _In_ PVOID  Context,
_In_ BOOLEAN  Wait 
)
static

Definition at line 94 of file IoReadWrite_drv.c.

97{
99 ok(0, "Unexpected call to AcquireForReadAhead\n");
100 return TRUE;
101}

Referenced by TestIrpHandler().

◆ TestCommonRead()

static NTSTATUS TestCommonRead ( _In_ PVOID  Buffer,
_In_ ULONG  Length,
_In_ LONGLONG  FileOffset,
_In_ ULONG  LockKey,
_Out_ PIO_STATUS_BLOCK  IoStatus 
)
static

Definition at line 115 of file IoReadWrite_drv.c.

121{
123 {
124 trace("FileOffset %I64d > file size\n", FileOffset);
126 IoStatus->Information = 0;
127 }
128 else if (Length == 0 || Buffer == NULL)
129 {
131 IoStatus->Information = TEST_FILE_SIZE - FileOffset;
132 }
133 else
134 {
138 IoStatus->Information = Length;
139 }
141 return STATUS_PENDING;
142 return IoStatus->Status;
143}
#define KEY_RETURN_PENDING
Definition: IoReadWrite.h:86
static NTSTATUS TestGetReturnStatus(_In_ ULONG LockKey)
Definition: IoReadWrite.h:41
#define TEST_FILE_SIZE
Definition: IoReadWrite.h:11
#define KEY_GET_DATA(key)
Definition: IoReadWrite.h:89
#define trace
Definition: atltest.h:70
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:160
Definition: bufpool.h:45
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2665
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:599
#define min(a, b)
Definition: monoChain.cc:55
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
Definition: mxum.h:159
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_END_OF_FILE
Definition: shellext.h:67
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66

Referenced by TestFastIoRead(), and TestIrpHandler().

◆ TestCommonWrite()

static NTSTATUS TestCommonWrite ( _In_ PVOID  Buffer,
_In_ ULONG  Length,
_In_ LONGLONG  FileOffset,
_In_ ULONG  LockKey,
_Out_ PIO_STATUS_BLOCK  IoStatus 
)
static

Definition at line 194 of file IoReadWrite_drv.c.

200{
201 ULONG i;
202 PUCHAR BufferBytes = Buffer;
203
204 for (i = 0; i < Length; i++)
205 ok(BufferBytes[i] == KEY_GET_DATA(LockKey), "Buffer[%lu] = 0x%x, expected 0x%x\n", i, BufferBytes[i], KEY_GET_DATA(LockKey));
207 IoStatus->Information = Length;
208
210 return STATUS_PENDING;
211 return IoStatus->Status;
212}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59

Referenced by TestFastIoWrite(), and TestIrpHandler().

◆ TestEntry()

NTSTATUS TestEntry ( _In_ PDRIVER_OBJECT  DriverObject,
_In_ PCUNICODE_STRING  RegistryPath,
_Out_ PCWSTR DeviceName,
_Inout_ INT Flags 
)

Definition at line 33 of file IoReadWrite_drv.c.

38{
40
41 PAGED_CODE();
42
44
45 *DeviceName = L"IoReadWrite";
46 *Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
47 TESTENTRY_BUFFERED_IO_DEVICE |
48 TESTENTRY_NO_READONLY_DEVICE;
49
52 DriverObject->FastIoDispatch = &TestFastIoDispatch;
53
58
59 return Status;
60}
#define PAGED_CODE()
static FAST_IO_DISPATCH TestFastIoDispatch
static FAST_IO_READ TestFastIoRead
static FAST_IO_WRITE TestFastIoWrite
static KMT_IRP_HANDLER TestIrpHandler
LONG NTSTATUS
Definition: precomp.h:26
Status
Definition: gdiplustypes.h:25
NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define STATUS_SUCCESS
Definition: shellext.h:65
PFAST_IO_WRITE FastIoWrite
Definition: iotypes.h:1736
PFAST_IO_READ FastIoRead
Definition: iotypes.h:1735
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_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_ ULONG Flags
Definition: wsk.h:170
#define IRP_MJ_CLEANUP

◆ TestFastIoRead()

static BOOLEAN NTAPI TestFastIoRead ( _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

Definition at line 148 of file IoReadWrite_drv.c.

157{
160
161 //trace("FastIoRead: %p %lx %I64d+%lu -> %p\n", FileObject, LockKey, FileOffset->QuadPart, Length, Buffer);
163 ok_bool_true(Wait, "Wait is");
165 Fcb = FileObject->FsContext;
166 ok_bool_true(Fcb->Cached, "Cached is");
167
169 ok((ULONG_PTR)Buffer < MM_USER_PROBE_ADDRESS, "Buffer is %p\n", Buffer);
170 ok((ULONG_PTR)FileOffset > MM_USER_PROBE_ADDRESS, "FileOffset is %p\n", FileOffset);
171 ok((ULONG_PTR)IoStatus > MM_USER_PROBE_ADDRESS, "IoStatus is %p\n", IoStatus);
173 {
175 }
177 {
179 return FALSE;
180 }
181 _SEH2_END;
182
183 if (Status == STATUS_PENDING)
184 return FALSE;
185
187 return TRUE;
188 else
189 return FALSE;
190}
#define KEY_USE_FASTIO
Definition: IoReadWrite.h:85
static NTSTATUS TestCommonRead(_In_ PVOID Buffer, _In_ ULONG Length, _In_ LONGLONG FileOffset, _In_ ULONG LockKey, _Out_ PIO_STATUS_BLOCK IoStatus)
static PDEVICE_OBJECT TestDeviceObject
static PFILE_OBJECT TestFileObject
static ULONG TestLastFastReadKey
#define ok_bool_true(value, desc)
Definition: apitest.h:77
#define MM_USER_PROBE_ADDRESS
Definition: armddk.h:19
_In_ PFCB Fcb
Definition: cdprocs.h:159
#define FALSE
Definition: types.h:117
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:159
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
uint32_t ULONG_PTR
Definition: typedefs.h:65
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170

◆ TestFastIoWrite()

static BOOLEAN NTAPI TestFastIoWrite ( _In_ PFILE_OBJECT  FileObject,
_In_ PLARGE_INTEGER  FileOffset,
_In_ ULONG  Length,
_In_ BOOLEAN  Wait,
_In_ ULONG  LockKey,
_In_ PVOID  Buffer,
_Out_ PIO_STATUS_BLOCK  IoStatus,
_In_ PDEVICE_OBJECT  DeviceObject 
)
static

Definition at line 217 of file IoReadWrite_drv.c.

226{
229
230 //trace("FastIoWrite: %p %lx %p -> %I64d+%lu\n", FileObject, LockKey, Buffer, FileOffset->QuadPart, Length);
232 ok_bool_true(Wait, "Wait is");
234 Fcb = FileObject->FsContext;
235 ok_bool_true(Fcb->Cached, "Cached is");
236
238 ok((ULONG_PTR)Buffer < MM_USER_PROBE_ADDRESS, "Buffer is %p\n", Buffer);
239 ok((ULONG_PTR)FileOffset > MM_USER_PROBE_ADDRESS, "FileOffset is %p\n", FileOffset);
240 ok((ULONG_PTR)IoStatus > MM_USER_PROBE_ADDRESS, "IoStatus is %p\n", IoStatus);
242 {
244 }
246 {
248 return FALSE;
249 }
250 _SEH2_END;
251
252 if (Status == STATUS_PENDING)
253 return FALSE;
254
256 return TRUE;
257 else
258 return FALSE;
259}
static ULONG TestLastFastWriteKey
static NTSTATUS TestCommonWrite(_In_ PVOID Buffer, _In_ ULONG Length, _In_ LONGLONG FileOffset, _In_ ULONG LockKey, _Out_ PIO_STATUS_BLOCK IoStatus)

◆ TestIrpHandler()

static NTSTATUS TestIrpHandler ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp,
_In_ PIO_STACK_LOCATION  IoStack 
)
static

Definition at line 263 of file IoReadWrite_drv.c.

267{
271 CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
272
273 PAGED_CODE();
274
275 DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
276 ASSERT(IoStack->MajorFunction == IRP_MJ_CREATE ||
277 IoStack->MajorFunction == IRP_MJ_CLEANUP ||
278 IoStack->MajorFunction == IRP_MJ_READ ||
279 IoStack->MajorFunction == IRP_MJ_WRITE);
280
282 Irp->IoStatus.Information = 0;
283
284 if (IoStack->MajorFunction == IRP_MJ_CREATE)
285 {
286 if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR))
287 {
289 TestFileObject = IoStack->FileObject;
290 }
291 Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(*Fcb), 'FwrI');
292 RtlZeroMemory(Fcb, sizeof(*Fcb));
293 ExInitializeFastMutex(&Fcb->HeaderMutex);
294 FsRtlSetupAdvancedHeader(&Fcb->Header, &Fcb->HeaderMutex);
295 Fcb->Header.AllocationSize.QuadPart = TEST_FILE_SIZE;
296 Fcb->Header.FileSize.QuadPart = TEST_FILE_SIZE;
297 Fcb->Header.ValidDataLength.QuadPart = TEST_FILE_SIZE;
298 IoStack->FileObject->FsContext = Fcb;
299 IoStack->FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
300 if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
301 IoStack->FileObject->FileName.Buffer[1] != 'N')
302 {
303 Fcb->Cached = TRUE;
304 Callbacks.AcquireForLazyWrite = TestAcquireForLazyWrite;
305 Callbacks.ReleaseFromLazyWrite = TestReleaseFromLazyWrite;
306 Callbacks.AcquireForReadAhead = TestAcquireForReadAhead;
307 Callbacks.ReleaseFromReadAhead = TestReleaseFromReadAhead;
308 CcInitializeCacheMap(IoStack->FileObject,
309 (PCC_FILE_SIZES)&Fcb->Header.AllocationSize,
310 FALSE,
311 &Callbacks,
312 NULL);
313 }
314 Irp->IoStatus.Information = FILE_OPENED;
316 }
317 else if (IoStack->MajorFunction == IRP_MJ_CLEANUP)
318 {
319 KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
320 CcUninitializeCacheMap(IoStack->FileObject, NULL, &CacheUninitEvent);
322 Fcb = IoStack->FileObject->FsContext;
323 ExFreePoolWithTag(Fcb, 'FwrI');
324 IoStack->FileObject->FsContext = NULL;
326 }
327 else if (IoStack->MajorFunction == IRP_MJ_READ)
328 {
329 //trace("IRP_MJ_READ: %p %lx %I64d+%lu -> %p\n", IoStack->FileObject, IoStack->Parameters.Read.Key, IoStack->Parameters.Read.ByteOffset.QuadPart, IoStack->Parameters.Read.Length, Irp->AssociatedIrp.SystemBuffer);
331 ok_eq_pointer(IoStack->FileObject, TestFileObject);
332 Fcb = IoStack->FileObject->FsContext;
333 if (Fcb->Cached)
334 ok_eq_hex(IoStack->Parameters.Read.Key, TestLastFastReadKey);
335 ok(Irp->AssociatedIrp.SystemBuffer == NULL ||
336 (ULONG_PTR)Irp->AssociatedIrp.SystemBuffer > MM_USER_PROBE_ADDRESS,
337 "Buffer is %p\n",
338 Irp->AssociatedIrp.SystemBuffer);
339 Status = TestCommonRead(Irp->AssociatedIrp.SystemBuffer,
340 IoStack->Parameters.Read.Length,
341 IoStack->Parameters.Read.ByteOffset.QuadPart,
342 IoStack->Parameters.Read.Key,
343 &Irp->IoStatus);
344 }
345 else if (IoStack->MajorFunction == IRP_MJ_WRITE)
346 {
347 //trace("IRP_MJ_WRITE: %p %lx %I64d+%lu -> %p\n", IoStack->FileObject, IoStack->Parameters.Write.Key, IoStack->Parameters.Write.ByteOffset.QuadPart, IoStack->Parameters.Write.Length, Irp->AssociatedIrp.SystemBuffer);
349 ok_eq_pointer(IoStack->FileObject, TestFileObject);
350 Fcb = IoStack->FileObject->FsContext;
351 if (Fcb->Cached)
352 ok_eq_hex(IoStack->Parameters.Write.Key, TestLastFastWriteKey);
353 ok(Irp->AssociatedIrp.SystemBuffer == NULL ||
354 (ULONG_PTR)Irp->AssociatedIrp.SystemBuffer > MM_USER_PROBE_ADDRESS,
355 "Buffer is %p\n",
356 Irp->AssociatedIrp.SystemBuffer);
357 Status = TestCommonWrite(Irp->AssociatedIrp.SystemBuffer,
358 IoStack->Parameters.Write.Length,
359 IoStack->Parameters.Write.ByteOffset.QuadPart,
360 IoStack->Parameters.Write.Key,
361 &Irp->IoStatus);
362 }
363
364 if (Status == STATUS_PENDING)
365 {
369 }
370 else
371 {
372 Irp->IoStatus.Status = Status;
374 }
375
376 return Status;
377}
static VOID NTAPI TestReleaseFromLazyWrite(_In_ PVOID Context)
static BOOLEAN NTAPI TestAcquireForReadAhead(_In_ PVOID Context, _In_ BOOLEAN Wait)
static BOOLEAN NTAPI TestAcquireForLazyWrite(_In_ PVOID Context, _In_ BOOLEAN Wait)
static VOID NTAPI TestReleaseFromReadAhead(_In_ PVOID Context)
#define ok_eq_hex(value, expected)
Definition: apitest.h:76
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
_In_ PIRP Irp
Definition: csq.h:116
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#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 NonPagedPool
Definition: env_spec_w32.h:307
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
IoMarkIrpPending(Irp)
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define KernelMode
Definition: asm.h:34
#define FILE_OPENED
Definition: nt_native.h:769
@ NotificationEvent
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define DPRINT
Definition: sndvol32.h:71
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: ntfs.h:518
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:925
PFILE_OBJECT FileObject
Definition: ntfs.h:520
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
#define IO_NO_INCREMENT
Definition: iotypes.h:598
@ Executive
Definition: ketypes.h:415
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ TestReleaseFromLazyWrite()

static VOID NTAPI TestReleaseFromLazyWrite ( _In_ PVOID  Context)
static

Definition at line 84 of file IoReadWrite_drv.c.

86{
88 ok(0, "Unexpected call to ReleaseFromLazyWrite\n");
89}

Referenced by TestIrpHandler().

◆ TestReleaseFromReadAhead()

static VOID NTAPI TestReleaseFromReadAhead ( _In_ PVOID  Context)
static

Definition at line 106 of file IoReadWrite_drv.c.

108{
110 ok(0, "Unexpected call to ReleaseFromReadAhead\n");
111}

Referenced by TestIrpHandler().

◆ TestUnload()

VOID TestUnload ( _In_ PDRIVER_OBJECT  DriverObject)

Definition at line 63 of file IoReadWrite_drv.c.

65{
66 PAGED_CODE();
67}

Variable Documentation

◆ TestDeviceObject

PDEVICE_OBJECT TestDeviceObject
static

Definition at line 30 of file IoReadWrite_drv.c.

Referenced by TestFastIoRead(), TestFastIoWrite(), and TestIrpHandler().

◆ TestFastIoDispatch

FAST_IO_DISPATCH TestFastIoDispatch
static

Definition at line 26 of file IoReadWrite_drv.c.

Referenced by TestEntry().

◆ TestFastIoRead

FAST_IO_READ TestFastIoRead
static

Definition at line 23 of file IoReadWrite_drv.c.

Referenced by TestEntry().

◆ TestFastIoWrite

FAST_IO_WRITE TestFastIoWrite
static

Definition at line 24 of file IoReadWrite_drv.c.

Referenced by TestEntry().

◆ TestFileObject

PFILE_OBJECT TestFileObject
static

Definition at line 29 of file IoReadWrite_drv.c.

Referenced by TestFastIoRead(), TestFastIoWrite(), and TestIrpHandler().

◆ TestIrpHandler

KMT_IRP_HANDLER TestIrpHandler
static

Definition at line 22 of file IoReadWrite_drv.c.

Referenced by TestEntry().

◆ TestLastFastReadKey

ULONG TestLastFastReadKey
static

Definition at line 27 of file IoReadWrite_drv.c.

Referenced by TestFastIoRead(), and TestIrpHandler().

◆ TestLastFastWriteKey

ULONG TestLastFastWriteKey
static

Definition at line 28 of file IoReadWrite_drv.c.

Referenced by TestFastIoWrite(), and TestIrpHandler().