IopQueryLegacyBusInformation
NTSTATUS __stdcall IopQueryLegacyBusInformation(
PDEVICE_OBJECT DeviceObject,
_LPGUID InterfaceType,
_INTERFACE_TYPE *BusNumber,
UINT32 *a4){
int v7;
UINT32 *v9;
_QWORD *DeviceNode;
__int64 v11;
_IO_STACK_LOCATION TopStackLocation;
UINT64 Information;
Information = 0i64;
memset(&TopStackLocation, 0i64, sizeof(TopStackLocation));
*(_WORD *)&TopStackLocation.MajorFunction = 6171;
v7 = IopSynchronousCall(DeviceObject, &TopStackLocation, 3221225659i64, 0i64, &Information);
if( v7 >= 0 )
{
v9 = (UINT32 *)Information;
if( Information )
{
if( BusNumber )
*BusNumber = *(_INTERFACE_TYPE *)(Information + 16);
if( a4 )
*a4 = v9[5];
ExFreePoolWithTag(v9, 0);
}
else
{
DeviceNode = DeviceObject->DeviceObjectExtension->DeviceNode;
if( DeviceNode )
{
v11 = DeviceNode[2];
if( v11 )
{
if( *(_QWORD *)(v11 + 64) )
{
DbgPrint("*** IopQueryLegacyBusInformation - Driver %wZ returned STATUS_SUCCESS\n", v11 + 56);
DbgPrint(" for IRP_MN_QUERY_LEGACY_BUS_INFORMATION, and a NULL POINTER.\n");
}
}
}
}
}
return v7;
}Referenced by:
PipCallDriverAddDevice