PipDeviceObjectListAdd
NTSTATUS __stdcall PipDeviceObjectListAdd(
_DEVICE_OBJECT_LIST **List,
_DEVICE_OBJECT *Device,
_DEVICE_RELATION_LEVEL RelationLevel,
_DEVICE_TAGGED_FOR_REMOVAL Tagged){
_DEVICE_OBJECT_LIST *v4;
__int64 Count;
NTSTATUS result;
_DEVICE_OBJECT_LIST *Lista;
Lista = *List;
v4 = Lista;
if( Lista->Count + 1 != Lista->MaxCount || (result = PipGrowDeviceObjectList(&Lista), v4 = Lista, result >= 0) )
{
Count = v4->Count;
ObfReferenceObjectWithTag(Device, 0x4C706E50ui64);
v4->Devices[Count].Flags = 0;
v4->Devices[Count].DeviceObject = Device;
v4->Devices[Count].RelationLevel = RelationLevel;
if( Tagged == DEVICE_TAGGED )
{
v4->Devices[Count].Flags = 1;
++v4->TagCount;
}
++v4->Count;
result = 0;
}
*List = v4;
return result;
}Referenced by:
IopAddRelationToList
PipGrowDeviceObjectList