PiDqQueryAddObjectToResultSet

INT64 __fastcall PiDqQueryAddObjectToResultSet(INT64 a1, INT64 a2){
  unsigned int v2; 
  UINT8 v4; 
  INT64 v5; 
  v5 = a2;
  v2 = 0;
  v4 = 0;
  if( RtlInsertElementGenericTableAvl((RTL_AVL_TABLE *)(a1 + 72), &v5, 8ui64, &v4) )
  {
    if( v4 )
      _InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
  }
  else
  {
    return(unsigned int)-1073741670;
  }
  return v2;
}

Referenced by:

PiDqQueryApplyObjectEvent
PiDqQueryEnumObject