ReactOS  0.4.15-dev-1068-g467feb9
CcMapData_user.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests
3  * LICENSE: GPLv2+ - See COPYING in the top level directory
4  * PURPOSE: Kernel-Mode Test Suite CcMapData test user-mode part
5  * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
6  */
7 
8 #include <kmt_test.h>
9 
10 #define IOCTL_START_TEST 1
11 #define IOCTL_FINISH_TEST 2
12 
14 {
15  DWORD Ret;
16  ULONG TestId;
17 
18  KmtLoadDriver(L"CcMapData", FALSE);
19  KmtOpenDriver();
20 
21  /* 3 tests for offset
22  * 1 test for BCB
23  * 1 test for length/offset
24  */
25  for (TestId = 0; TestId < 5; ++TestId)
26  {
28  ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
30  ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
31  }
32 
35 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define IOCTL_FINISH_TEST
#define IOCTL_START_TEST
#define FALSE
Definition: types.h:117
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
VOID KmtCloseDriver(VOID)
Definition: support.c:207
unsigned long DWORD
Definition: ntddk_ex.h:95
START_TEST(CcMapData)
static const WCHAR L[]
Definition: oid.c:1250
VOID KmtUnloadDriver(VOID)
Definition: support.c:156
#define ok(value,...)
Definition: atltest.h:57
unsigned int ULONG
Definition: retypes.h:1
VOID KmtLoadDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning)
Definition: support.c:128
VOID KmtOpenDriver(VOID)
Definition: support.c:181
DWORD KmtSendUlongToDriver(IN DWORD ControlCode, IN DWORD Value)
Definition: support.c:305