ReactOS  0.4.15-dev-3017-g1d9542d
HidP_user.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: Kernel-Mode Test Suite Driver Object test user-mode part
5  * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include <kmt_test.h>
9 #include "HidP.h"
10 
11 DWORD
14  IN OUT SC_HANDLE *ServiceHandle);
15 
16 START_TEST(HidPDescription)
17 {
18  SC_HANDLE ServiceHandle;
19  DWORD Error;
20 
21  ServiceHandle = NULL;
22  KmtStartService(L"hidusb", &ServiceHandle);
23  CloseServiceHandle(ServiceHandle);
24 
25  KmtLoadDriver(L"HidP", FALSE);
26  KmtOpenDriver();
27 
29  ok(Error == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lx\n", Error);
30 
33 }
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FALSE
Definition: types.h:117
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
Definition: scm.c:580
VOID KmtCloseDriver(VOID)
Definition: support.c:207
LPTSTR ServiceName
Definition: ServiceMain.c:15
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL Error
Definition: chkdsk.c:66
static const WCHAR L[]
Definition: oid.c:1250
#define IOCTL_TEST_DESCRIPTION
Definition: HidP.h:11
DWORD KmtSendToDriver(IN DWORD ControlCode)
Definition: support.c:231
VOID KmtUnloadDriver(VOID)
Definition: support.c:156
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define OUT
Definition: typedefs.h:40
START_TEST(HidPDescription)
Definition: HidP_user.c:16
VOID KmtLoadDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning)
Definition: support.c:128
DWORD KmtStartService(IN PCWSTR ServiceName OPTIONAL, IN OUT SC_HANDLE *ServiceHandle)
Definition: service.c:217
VOID KmtOpenDriver(VOID)
Definition: support.c:181
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68