# C1.Util.DX.CppObject

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_CppObject" data-uid="C1.Util.DX.CppObject" class="text-break">CppObject Class
</h1>
  <div class="markdown level0 summary"><p>Root class for all Cpp interop object.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.Util.DX.DisposeBase.html">DisposeBase</a></div>
    <div class="level2"><span class="xref">CppObject</span></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.CppObjectShadow.html">CppObjectShadow</a></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.Direct3D11.CommonShaderStageBase.html">CommonShaderStageBase</a></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.Direct3D11.InputAssemblerStage.html">InputAssemblerStage</a></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.Direct3D11.OutputMergerStage.html">OutputMergerStage</a></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.Direct3D11.RasterizerStage.html">RasterizerStage</a></div>
      <div class="level3"><a class="xref" href="C1.Util.DX.Direct3D11.StreamOutputStage.html">StreamOutputStage</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Util.DX.html">C1.Util.DX</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.DX.4.8.dll</h6>
  <h5 id="C1_Util_DX_CppObject_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class CppObject : DisposeBase, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class CppObject
    Inherits DisposeBase
    Implements IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_CppObject__ctor" data-uid="C1.Util.DX.CppObject.#ctor">
          <a class="xref" href="C1.Util.DX.CppObject.-ctor.html#C1_Util_DX_CppObject__ctor">CppObject()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject__ctor_System_IntPtr_" data-uid="C1.Util.DX.CppObject.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.CppObject.-ctor.html#C1_Util_DX_CppObject__ctor_System_IntPtr_">CppObject(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_CppObject_NativePointer" data-uid="C1.Util.DX.CppObject.NativePointer">
          <a class="xref" href="C1.Util.DX.CppObject.NativePointer.html#C1_Util_DX_CppObject_NativePointer">NativePointer</a>
        </td>
        <td class="markdown level1 summary"><p>Get a pointer to the underlying Cpp Object</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_Tag" data-uid="C1.Util.DX.CppObject.Tag">
          <a class="xref" href="C1.Util.DX.CppObject.Tag.html#C1_Util_DX_CppObject_Tag">Tag</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a custom user tag object to associate with this instance..</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_CppObject_Dispose_System_Boolean_" data-uid="C1.Util.DX.CppObject.Dispose(System.Boolean)">
          <a class="xref" href="C1.Util.DX.CppObject.Dispose.html#C1_Util_DX_CppObject_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Clean up any resources being used.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_FromPointer__1_System_IntPtr_" data-uid="C1.Util.DX.CppObject.FromPointer``1(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.CppObject.FromPointer.html#C1_Util_DX_CppObject_FromPointer__1_System_IntPtr_">FromPointer&lt;T&gt;(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Instantiate a ComObject from a native pointer.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_FromTemp_C1_Util_DX_CppObject_" data-uid="C1.Util.DX.CppObject.FromTemp(C1.Util.DX.CppObject)">
          <a class="xref" href="C1.Util.DX.CppObject.FromTemp.html#C1_Util_DX_CppObject_FromTemp_C1_Util_DX_CppObject_">FromTemp(CppObject)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes this instance with a pointer from a temporary object and set the pointer of the temporary<br>
object to IntPtr.Zero.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_FromTemp_System_IntPtr_" data-uid="C1.Util.DX.CppObject.FromTemp(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.CppObject.FromTemp.html#C1_Util_DX_CppObject_FromTemp_System_IntPtr_">FromTemp(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes this instance with a pointer from a temporary object and set the pointer of the temporary<br>
object to IntPtr.Zero.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_NativePointerUpdated_System_IntPtr_" data-uid="C1.Util.DX.CppObject.NativePointerUpdated(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.CppObject.NativePointerUpdated.html#C1_Util_DX_CppObject_NativePointerUpdated_System_IntPtr_">NativePointerUpdated(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Method called when the <a class="xref" href="C1.Util.DX.CppObject.NativePointer.html#C1_Util_DX_CppObject_NativePointer">NativePointer</a> is updated.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_NativePointerUpdating" data-uid="C1.Util.DX.CppObject.NativePointerUpdating">
          <a class="xref" href="C1.Util.DX.CppObject.NativePointerUpdating.html#C1_Util_DX_CppObject_NativePointerUpdating">NativePointerUpdating()</a>
        </td>
        <td class="markdown level1 summary"><p>Method called when <a class="xref" href="C1.Util.DX.CppObject.NativePointer.html#C1_Util_DX_CppObject_NativePointer">NativePointer</a> is going to be update.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_CppObject_ToCallbackPtr__1_C1_Util_DX_ICallbackable_" data-uid="C1.Util.DX.CppObject.ToCallbackPtr``1(C1.Util.DX.ICallbackable)">
          <a class="xref" href="C1.Util.DX.CppObject.ToCallbackPtr.html#C1_Util_DX_CppObject_ToCallbackPtr__1_C1_Util_DX_ICallbackable_">ToCallbackPtr&lt;TCallback&gt;(ICallbackable)</a>
        </td>
        <td class="markdown level1 summary"><p>Return the unmanaged C++ pointer from a <a class="xref" href="C1.Util.DX.ICallbackable.html">ICallbackable</a> instance.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="operators">Operators
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_CppObject_op_Explicit_C1_Util_DX_CppObject__System_IntPtr" data-uid="C1.Util.DX.CppObject.op_Explicit(C1.Util.DX.CppObject)~System.IntPtr">
          <a class="xref" href="C1.Util.DX.CppObject.op_Explicit.html#C1_Util_DX_CppObject_op_Explicit_C1_Util_DX_CppObject__System_IntPtr">explicit operator IntPtr(CppObject)</a>
        </td>
        <td class="markdown level1 summary"><p>Performs an explicit conversion from <a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a> to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
