54 if (
Cached && UseFastIo && !ReturnPending)
107 if (
Cached && UseFastIo && !ReturnPending)
137 if ((
Cached && UseFastIo && !ReturnPending &&
332 trace(
"Non-Cached read, no FastIo, direct return\n");
334 trace(
"Non-Cached read, allow FastIo, direct return\n");
336 trace(
"Non-Cached read, no FastIo, pending return\n");
338 trace(
"Non-Cached read, allow FastIo, pending return\n");
341 trace(
"Non-Cached write, no FastIo, direct return\n");
343 trace(
"Non-Cached write, allow FastIo, direct return\n");
345 trace(
"Non-Cached write, no FastIo, pending return\n");
347 trace(
"Non-Cached write, allow FastIo, pending return\n");
370 trace(
"Cached read, no FastIo, direct return\n");
372 trace(
"Cached read, allow FastIo, direct return\n");
374 trace(
"Cached read, no FastIo, pending return\n");
376 trace(
"Cached read, allow FastIo, pending return\n");
379 trace(
"Cached write, no FastIo, direct return\n");
381 trace(
"Cached write, allow FastIo, direct return\n");
383 trace(
"Cached write, no FastIo, pending return\n");
385 trace(
"Cached write, allow FastIo, pending return\n");
#define KEY_FAIL_VERIFY_REQUIRED
#define KEY_RETURN_PENDING
#define KEY_FAIL_OVERFLOW
static NTSTATUS TestGetReturnStatus(_In_ ULONG LockKey)
static VOID TestRead(_In_ HANDLE FileHandle, _In_ BOOLEAN Cached, _In_ BOOLEAN UseFastIo, _In_ BOOLEAN ReturnPending)
static VOID TestWrite(_In_ HANDLE FileHandle, _In_ BOOLEAN Cached, _In_ BOOLEAN UseFastIo, _In_ BOOLEAN ReturnPending)
#define ok_eq_hex(value, expected)
#define ok_eq_ulong(value, expected)
#define ok_eq_uint(value, expected)
#define ok_eq_int(value, expected)
#define ok_eq_ulongptr(value, expected)
#define FILE_NON_DIRECTORY_FILE
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
#define FILE_SYNCHRONOUS_IO_NONALERT
#define OBJ_CASE_INSENSITIVE
#define RtlFillMemory(Dest, Length, Fill)
#define KmtEndSeh(ExpectedStatus)
#define InitializeObjectAttributes(p, n, a, r, s)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
_In_ ULONG _In_ BOOLEAN Cached
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI NtWriteFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID WriteBuffer, IN ULONG WriteBufferLength, IN PLARGE_INTEGER FileOffset OPTIONAL, IN PULONG LockOperationKey OPTIONAL)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
_In_ ULONG _In_ ULONG Offset
#define STATUS_ACCESS_VIOLATION
#define STATUS_BUFFER_OVERFLOW
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
DWORD KmtLoadAndOpenDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning)
VOID KmtCloseDriver(VOID)
VOID KmtUnloadDriver(VOID)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
#define RTL_CONSTANT_STRING(s)
DWORD WINAPI GetLastError(void)
_Out_ PHANDLE EventHandle