Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
Irp->IoStatus.Information = 0;
+ if (MinorFunction == IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
+ {
+ Irp->IoStatus.Information = (ULONG_PTR)Stack->Parameters.FilterResourceRequirements.IoResourceRequirementList;
+ }
+
IrpSp = IoGetNextIrpStackLocation(Irp);
IrpSp->MinorFunction = (UCHAR)MinorFunction;
sizeof(ULONG));
/* Set 'UINumber' value */
- if (DeviceCapabilities.UINumber != (ULONG)-1)
+ if (DeviceCapabilities.UINumber != MAXULONG)
{
RtlInitUnicodeString(&ValueName, L"UINumber");
Status = ZwSetValueKey(InstanceKey,
RtlInitUnicodeString(&ClassGUID, NULL);
QueryTable[0].Name = L"Service";
- QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED;
+ QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
QueryTable[0].EntryContext = Service;
QueryTable[1].Name = L"ClassGUID";
ExInitializeFastMutex(&IopBusTypeGuidListLock);
/* Initialize the Bus Type GUID List */
- IopBusTypeGuidList = ExAllocatePool(PagedPool, sizeof(IO_BUS_TYPE_GUID_LIST));
+ IopBusTypeGuidList = ExAllocatePool(NonPagedPool, sizeof(IO_BUS_TYPE_GUID_LIST));
if (!IopBusTypeGuidList) {
DPRINT1("ExAllocatePool() failed\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, STATUS_NO_MEMORY, 0, 0, 0);
case DevicePropertyAddress:
/* Query the device caps */
Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps);
- if (NT_SUCCESS(Status) && (DeviceCaps.Address != (ULONG)-1))
+ if (NT_SUCCESS(Status) && (DeviceCaps.Address != MAXULONG))
{
/* Return length */
*ResultLength = sizeof(ULONG);
* always contains the enumerator name followed by \\ */
Ptr = wcschr(DeviceNode->InstancePath.Buffer, L'\\');
ASSERT(Ptr);
- Length = (Ptr - DeviceNode->InstancePath.Buffer + 1) * sizeof(WCHAR);
+ Length = (Ptr - DeviceNode->InstancePath.Buffer) * sizeof(WCHAR);
Data = DeviceNode->InstancePath.Buffer;
break;