# C1.Util.DX.DXGI.Device.QueryResourceResidency

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DXGI_Device_QueryResourceResidency_" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency*">QueryResourceResidency Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DXGI_Device_QueryResourceResidency_" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency*"></a>
<h4 id="C1_Util_DX_DXGI_Device_QueryResourceResidency_C1_Util_DX_ComObject___" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency(C1.Util.DX.ComObject[])">QueryResourceResidency(params ComObject[])</h4>
<div class="markdown level1 summary"><p>Gets the residency status of an array of resources.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Residency[] QueryResourceResidency(params ComObject[] comObjects)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function QueryResourceResidency(ParamArray comObjects As ComObject()) As Residency()</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a>[]</td>
      <td><span class="parametername">comObjects</span></td>
      <td><p>An array of <a class="xref" href="C1.Util.DX.DXGI.Resource.html">Resource</a> interfaces.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.Residency.html">Residency</a>[]</td>
      <td><p>Returns an array of <a class="xref" href="C1.Util.DX.DXGI.Residency.html">Residency</a> flags. Each element describes the residency status for corresponding element in  the ppResources argument array.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DXGI_Device_QueryResourceResidency_C1_Util_DX_ComObject____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.   Note that the residency status will constantly change. If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the DXGI_RESIDENCY_EVICTED_TO_DISK flag. Note??This method should not be called every frame as it incurs a non-trivial amount of overhead.</p>
</div>


<a id="C1_Util_DX_DXGI_Device_QueryResourceResidency_" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency*"></a>
<h4 id="C1_Util_DX_DXGI_Device_QueryResourceResidency_C1_Util_DX_ComObject___C1_Util_DX_DXGI_Residency___System_Int32_" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency(C1.Util.DX.ComObject[],C1.Util.DX.DXGI.Residency[],System.Int32)">QueryResourceResidency(ComObject[], Residency[], int)</h4>
<div class="markdown level1 summary"><p>HRESULT IDXGIDevice::QueryResourceResidency([In, Buffer] const IUnknown** ppResources,[Out, Buffer] DXGI_RESIDENCY* pResidencyStatus,[In] unsigned int NumResources)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void QueryResourceResidency(ComObject[] resourcesOut, Residency[] residencyStatusRef, int numResources)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub QueryResourceResidency(resourcesOut As ComObject(), residencyStatusRef As Residency(), numResources As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a>[]</td>
      <td><span class="parametername">resourcesOut</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.Residency.html">Residency</a>[]</td>
      <td><span class="parametername">residencyStatusRef</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">numResources</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DXGI_Device_QueryResourceResidency_" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency*"></a>
<h4 id="C1_Util_DX_DXGI_Device_QueryResourceResidency_C1_Util_DX_ComArray_C1_Util_DX_ComObject__C1_Util_DX_DXGI_Residency___System_Int32_" data-uid="C1.Util.DX.DXGI.Device.QueryResourceResidency(C1.Util.DX.ComArray{C1.Util.DX.ComObject},C1.Util.DX.DXGI.Residency[],System.Int32)">QueryResourceResidency(ComArray&lt;ComObject&gt;, Residency[], int)</h4>
<div class="markdown level1 summary"><p>HRESULT IDXGIDevice::QueryResourceResidency([In, Buffer] const IUnknown** ppResources,[Out, Buffer] DXGI_RESIDENCY* pResidencyStatus,[In] unsigned int NumResources)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void QueryResourceResidency(ComArray&lt;ComObject&gt; resourcesOut, Residency[] residencyStatusRef, int numResources)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub QueryResourceResidency(resourcesOut As ComArray(Of ComObject), residencyStatusRef As Residency(), numResources As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComArray-1.html">ComArray</a>&lt;<a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a>&gt;</td>
      <td><span class="parametername">resourcesOut</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.Residency.html">Residency</a>[]</td>
      <td><span class="parametername">residencyStatusRef</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">numResources</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
