return STATUS_INVALID_PARAMETER;
}
+ if (!IopIsValidPhysicalDeviceObject(DeviceObject))
+ return STATUS_INVALID_DEVICE_REQUEST;
+ DeviceNode = IopGetDeviceNode(DeviceObject);
+
/*
* Calculate the length of the base key name. This is the full
* name for driver key or the name excluding "Device Parameters"
}
else
{
- if (!IopIsValidPhysicalDeviceObject(DeviceObject))
- return STATUS_INVALID_DEVICE_REQUEST;
- DeviceNode = IopGetDeviceNode(DeviceObject);
KeyNameLength += sizeof(EnumKeyName) - sizeof(UNICODE_NULL) +
DeviceNode->InstancePath.Length;
}