1 /* 2 * PROJECT: ReactOS kernel-mode tests 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: Kernel-Mode Test Suite Device Object test user-mode part 5 * COPYRIGHT: Copyright 2011-2023 Thomas Faber (thomas.faber@reactos.org) 6 * COPYRIGHT: Copyright 2022 Timo Kreuzer (timo.kreuzer@reactos.org) 7 */ 8 9 #include <kmt_test.h> 10 11 START_TEST(IoDeviceObject) 12 { 13 DWORD Error; 14 15 /* make sure IoHelper has an existing service key, but is not started */ 16 Error = KmtLoadDriver(L"IoHelper", FALSE); 17 ok_eq_int(Error, ERROR_SUCCESS); 18 if (Error) 19 return; 20 /* Can't use the normal unload function here because we need the 21 * service to stick around. */ 22 KmtUnloadDriverKeepService(); 23 24 Error = KmtLoadAndOpenDriver(L"IoDeviceObject", TRUE); 25 ok_eq_int(Error, ERROR_SUCCESS); 26 if (Error) 27 return; 28 29 KmtCloseDriver(); 30 KmtUnloadDriver(); 31 } 32