PipGrowDeviceObjectList
NTSTATUS __stdcall PipGrowDeviceObjectList(_DEVICE_OBJECT_LIST **List){
_DEVICE_OBJECT_LIST *v1;
NTSTATUS v2;
_DEVICE_OBJECT_LIST *DeviceObjectList;
unsigned int i;
_DEVICE_TAGGED_FOR_REMOVAL Tagged;
_DEVICE_RELATION_LEVEL RelationLevel;
_DEVICE_OBJECT *DeviceObject;
_DEVICE_OBJECT_LIST *Lista;
v1 = *List;
v2 = 0;
DeviceObject = 0i64;
RelationLevel = RELATION_LEVEL_REMOVE_EJECT;
Tagged = DEVICE_UNTAGGED;
DeviceObjectList = PiAllocateDeviceObjectList(v1->OperationCode, 2 * v1->MaxCount);
Lista = DeviceObjectList;
if( DeviceObjectList )
{
for( i = 0; i < v1->Count; ++i )
{
PipDeviceObjectListElementAt(v1, i, &DeviceObject, &RelationLevel, &Tagged);
PipDeviceObjectListAdd(&Lista, DeviceObject, RelationLevel, Tagged);
}
PiClearDeviceObjectList(v1);
ExFreePoolWithTag(v1, 0);
DeviceObjectList = Lista;
}
else
{
v2 = -1073741670;
}
*List = DeviceObjectList;
return v2;
}Referenced by:
PipDeviceObjectListAdd