41 *
Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE;
76 DPRINT(
"IOCTL_EXPECT_EXPRESSION, InLength = %lu\n", InLength);
80 if (InLength %
sizeof(
WCHAR) != 0)
92 DPRINT(
"IOCTL_RETURN_QUERY_ATTRIBUTES, InLength = %lu\n", InLength);
93 if (InLength !=
sizeof(
ULONG))
103 DPRINT(
"IOCTL_EXPECT_SET_ATTRIBUTES, InLength = %lu\n", InLength);
104 if (InLength !=
sizeof(
ULONG))
130 DPRINT(
"IRP %x/%x\n", IoStackLocation->MajorFunction, IoStackLocation->MinorFunction);
133 ok(IoStackLocation->MinorFunction ==
IRP_MN_QUERY_DIRECTORY,
"Minor function: %u\n", IoStackLocation->MinorFunction);
137 "FileInformationClass: %d\n", IoStackLocation->Parameters.QueryDirectory.FileInformationClass);
141 "Expression is '%wZ', expected '%wZ'\n", IoStackLocation->Parameters.QueryDirectory.FileName, &
ExpectedExpression);
142 RtlZeroMemory(
Irp->UserBuffer, IoStackLocation->Parameters.QueryDirectory.Length);
148 Irp->IoStatus.Information = 0;
167 DPRINT(
"IRP %x/%x\n", IoStackLocation->MajorFunction, IoStackLocation->MinorFunction);
170 Irp->IoStatus.Information = 0;
176 BasicInfo =
Irp->AssociatedIrp.SystemBuffer;
185 Irp->IoStatus.Information =
sizeof(*BasicInfo);
207 DPRINT(
"IRP %x/%x\n", IoStackLocation->MajorFunction, IoStackLocation->MinorFunction);
214 BasicInfo =
Irp->AssociatedIrp.SystemBuffer;
226 Irp->IoStatus.Information = 0;
#define ok_eq_ulong(value, expected)
#define ok_eq_longlong(value, expected)
@ FileBothDirectoryInformation
static BOOLEAN ExpectingSetAttributes
static UNICODE_STRING ExpectedExpression
static ULONG ReturnQueryAttributes
static BOOLEAN ExpectingQueryAttributes
static WCHAR ExpressionBuffer[MAX_PATH]
static ULONG ExpectedSetAttributes
static KMT_IRP_HANDLER TestDirectoryControl
static KMT_IRP_HANDLER TestSetInformation
static KMT_MESSAGE_HANDLER TestMessageHandler
VOID TestUnload(IN PDRIVER_OBJECT DriverObject)
NTSTATUS TestEntry(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING RegistryPath, OUT PCWSTR *DeviceName, IN OUT INT *Flags)
static KMT_IRP_HANDLER TestQueryInformation
#define IOCTL_RETURN_QUERY_ATTRIBUTES
#define IOCTL_EXPECT_EXPRESSION
#define IOCTL_EXPECT_SET_ATTRIBUTES
NTSTATUS KmtRegisterMessageHandler(IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler)
NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define UNICODE_STRING_MAX_BYTES
#define UNREFERENCED_PARAMETER(P)
#define IoCompleteRequest
#define STATUS_NOT_SUPPORTED
#define IRP_MJ_DIRECTORY_CONTROL
#define IRP_MN_QUERY_DIRECTORY
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_QUERY_INFORMATION
#define STATUS_BUFFER_OVERFLOW
PULONG MinorVersion OPTIONAL
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
_Must_inspect_result_ _In_ ULONG Flags