ReactOS  0.4.14-dev-98-gb0d4763
CcCopyWrite_user.c File Reference
#include <kmt_test.h>
Include dependency graph for CcCopyWrite_user.c:

Go to the source code of this file.

Functions

 START_TEST (CcCopyWrite)
 

Function Documentation

◆ START_TEST()

START_TEST ( CcCopyWrite  )

Definition at line 10 of file CcCopyWrite_user.c.

11 {
12  HANDLE Handle;
17  PVOID Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, 4097);
18  UNICODE_STRING BigFile = RTL_CONSTANT_STRING(L"\\Device\\Kmtest-CcCopyWrite\\BigFile");
19  UNICODE_STRING SmallFile = RTL_CONSTANT_STRING(L"\\Device\\Kmtest-CcCopyWrite\\SmallFile");
20  UNICODE_STRING VerySmallFile = RTL_CONSTANT_STRING(L"\\Device\\Kmtest-CcCopyWrite\\VerySmallFile");
21  UNICODE_STRING NormalFile = RTL_CONSTANT_STRING(L"\\Device\\Kmtest-CcCopyWrite\\NormalFile");
22 
23  KmtLoadDriver(L"CcCopyWrite", FALSE);
24  KmtOpenDriver();
25 
29 
30  ByteOffset.QuadPart = 0;
33 
36 
37  NtClose(Handle);
38 
42 
43  ByteOffset.QuadPart = 0;
46 
49 
50  NtClose(Handle);
51 
55 
56  ByteOffset.QuadPart = 0;
59 
62 
63  NtClose(Handle);
64 
68 
69  ByteOffset.QuadPart = 0;
72 
75 
76  NtClose(Handle);
77 
81 
82  ByteOffset.QuadPart = 4097;
85 
88 
89  NtClose(Handle);
90 
91  RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer);
94 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
NTSTATUS NTAPI NtFlushBuffersFile(IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock)
Definition: iofunc.c:1485
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
_In_ HANDLE Handle
Definition: extypes.h:390
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)
Definition: file.c:3951
VOID KmtCloseDriver(VOID)
Definition: support.c:200
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3399
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
static const WCHAR L[]
Definition: oid.c:1250
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)
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
Status
Definition: gdiplustypes.h:24
VOID KmtUnloadDriver(VOID)
Definition: support.c:155
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define ok_eq_hex(value, expected)
VOID KmtLoadDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning)
Definition: support.c:127
VOID KmtOpenDriver(VOID)
Definition: support.c:174
return STATUS_SUCCESS
Definition: btrfs.c:2966
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
Definition: fatprocs.h:716
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14