# C1.Util.DX.Direct3D11.Device1.OpenSharedResource1

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1*">OpenSharedResource1 Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1*"></a>
<h4 id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1__1_System_IntPtr_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1``1(System.IntPtr)">OpenSharedResource1&lt;T&gt;(IntPtr)</h4>
<div class="markdown level1 summary"><p>Gives a device access to a shared resource that is referenced by name and that was created on a different device. You must have previously created the resource as shared and specified that it uses NT handles (that is, you set the <a class="xref" href="C1.Util.DX.Direct3D11.ResourceMiscFlags.html#C1_Util_DX_Direct3D11_ResourceMiscFlags_SharedNthandle">SharedNthandle</a> flag).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public T OpenSharedResource1&lt;T&gt;(IntPtr resourceHandle) where T : ComObject</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function OpenSharedResource1(Of T As ComObject)(resourceHandle As IntPtr) As T</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="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">resourceHandle</span></td>
      <td></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><span class="xref">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1*"></a>
<h4 id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1__1_System_String_C1_Util_DX_DXGI_SharedResourceFlags_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1``1(System.String,C1.Util.DX.DXGI.SharedResourceFlags)">OpenSharedResource1&lt;T&gt;(string, SharedResourceFlags)</h4>
<div class="markdown level1 summary"><p>Gives a device access to a shared resource that is referenced by name and that was created on a different device. You must have previously created the resource as shared and specified that it uses NT handles (that is, you set the <a class="xref" href="C1.Util.DX.Direct3D11.ResourceMiscFlags.html#C1_Util_DX_Direct3D11_ResourceMiscFlags_SharedNthandle">SharedNthandle</a> flag).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public T OpenSharedResource1&lt;T&gt;(string name, SharedResourceFlags desiredAccess) where T : ComObject</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function OpenSharedResource1(Of T As ComObject)(name As String, desiredAccess As SharedResourceFlags) As T</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="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.SharedResourceFlags.html">SharedResourceFlags</a></td>
      <td><span class="parametername">desiredAccess</span></td>
      <td></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><span class="xref">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1*"></a>
<h4 id="C1_Util_DX_Direct3D11_Device1_OpenSharedResource1_System_IntPtr_System_Guid_" data-uid="C1.Util.DX.Direct3D11.Device1.OpenSharedResource1(System.IntPtr,System.Guid)">OpenSharedResource1(IntPtr, Guid)</h4>
<div class="markdown level1 summary"><p>HRESULT ID3D11Device1::OpenSharedResource1([In] void* hResource,[In] const GUID&amp; returnedInterface,[Out] void** ppResource)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IntPtr OpenSharedResource1(IntPtr hResource, Guid returnedInterface)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function OpenSharedResource1(hResource As IntPtr, returnedInterface As Guid) As IntPtr</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="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">hResource</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></td>
      <td><span class="parametername">returnedInterface</span></td>
      <td></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="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
