2 * PROJECT: ReactOS kernel-mode tests
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Kernel-Mode Test Suite I/O Test Helper driver
5 * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
13 static KMT_IRP_HANDLER TestIrpHandler
;
17 IN PDRIVER_OBJECT DriverObject
,
18 IN PCUNICODE_STRING RegistryPath
,
19 OUT PCWSTR
*DeviceName
,
22 NTSTATUS Status
= STATUS_SUCCESS
;
27 UNREFERENCED_PARAMETER(DriverObject
);
28 UNREFERENCED_PARAMETER(RegistryPath
);
29 UNREFERENCED_PARAMETER(Flags
);
31 DPRINT("TestEntry. DriverObject=%p, RegistryPath=%wZ\n", DriverObject
, RegistryPath
);
33 *DeviceName
= L
"IoHelper";
35 for (i
= 0; i
<= IRP_MJ_MAXIMUM_FUNCTION
; ++i
)
36 KmtRegisterIrpHandler(i
, NULL
, TestIrpHandler
);
43 IN PDRIVER_OBJECT DriverObject
)
47 UNREFERENCED_PARAMETER(DriverObject
);
49 DPRINT("TestUnload. DriverObject=%p\n", DriverObject
);
55 IN PDEVICE_OBJECT DeviceObject
,
57 IN PIO_STACK_LOCATION IoStackLocation
)
59 NTSTATUS Status
= STATUS_SUCCESS
;
61 DPRINT("TestIrpHandler. Function=%s, DeviceObject=%p\n",
62 KmtMajorFunctionNames
[IoStackLocation
->MajorFunction
],
65 Irp
->IoStatus
.Status
= Status
;
66 Irp
->IoStatus
.Information
= 0;
68 IoCompleteRequest(Irp
, IO_NO_INCREMENT
);