[FLTMGR] Latest from my branch (#135)
[reactos.git] / modules / rostests / kmtests / fltmgr / fltmgr_load / fltmgr_user.c
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");
20 ok(KmtFltLoadDriver(FALSE, FALSE, FALSE, &hPort) == ERROR_PRIVILEGE_NOT_HELD, "\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 }