ReactOS  0.4.15-dev-3440-g915569a
fltmgr_user.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests - Filter Manager
3  * LICENSE: GPLv2+ - See COPYING in the top level directory
4  * PURPOSE: Tests for checking filters load and connect correctly
5  * PROGRAMMER: Ged Murphy <gedmurphy@reactos.org>
6  */
7 
8 #include <kmt_test.h>
9 
10 
11 START_TEST(FltMgrLoad)
12 {
13  static WCHAR FilterName[] = L"FltMgrLoad";
14  SC_HANDLE hService;
15  HANDLE hPort;
16 
17  trace("Message from user-mode\n");
18 
19  ok(KmtFltCreateService(FilterName, L"FltMgrLoad test driver", &hService) == ERROR_SUCCESS, "\n");
21  ok(KmtFltLoadDriver(TRUE, FALSE, FALSE, &hPort) == ERROR_SUCCESS, "\n");
22 
23  ok(KmtFltConnectComms(&hPort) == ERROR_SUCCESS, "\n");
24 
25  ok(KmtFltDisconnectComms(hPort) == ERROR_SUCCESS, "\n");
26  ok(KmtFltUnloadDriver(hPort, FALSE) == ERROR_SUCCESS, "\n");
27  KmtFltDeleteService(NULL, &hService);
28 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_PRIVILEGE_NOT_HELD
Definition: winerror.h:796
#define TRUE
Definition: types.h:120
DWORD KmtFltUnloadDriver(_In_ HANDLE *hPort, _In_ BOOLEAN DisonnectComms)
Definition: fltsupport.c:169
DWORD KmtFltCreateService(_In_z_ PCWSTR ServiceName, _In_z_ PCWSTR DisplayName, _Out_ SC_HANDLE *ServiceHandle)
Definition: fltsupport.c:63
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
DWORD KmtFltDeleteService(_In_opt_z_ PCWSTR ServiceName, _Inout_ SC_HANDLE *ServiceHandle)
Definition: fltsupport.c:97
#define trace
Definition: atltest.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD KmtFltDisconnectComms(_In_ HANDLE hPort)
Definition: fltsupport.c:224
START_TEST(FltMgrLoad)
Definition: fltmgr_user.c:11
#define ok(value,...)
Definition: atltest.h:57
DWORD KmtFltLoadDriver(_In_ BOOLEAN EnableDriverLoadPrivlege, _In_ BOOLEAN RestartIfRunning, _In_ BOOLEAN ConnectComms, _Out_ HANDLE *hPort)
Definition: fltsupport.c:112
#define NULL
Definition: types.h:112
DWORD KmtFltConnectComms(_Out_ HANDLE *hPort)
Definition: fltsupport.c:207