# C1.Util.DX.ComObject

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_ComObject" data-uid="C1.Util.DX.ComObject" class="text-break">ComObject Class
</h1>
  <div class="markdown level0 summary"><p>Root IUnknown class to interop with COM 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"><a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a></div>
    <div class="level3"><span class="xref">ComObject</span></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.Interpolator2.html">Interpolator2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.Manager2.html">Manager2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.PrimitiveInterpolation.html">PrimitiveInterpolation</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.Storyboard2.html">Storyboard2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.Timer.html">Timer</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.Transition2.html">Transition2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.TransitionFactory2.html">TransitionFactory2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.TransitionLibrary2.html">TransitionLibrary2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Animation.Variable2.html">Variable2</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.ComObjectCallback.html">ComObjectCallback</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.DXGIObject.html">DXGIObject</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.ISurfaceImageSourceManagerNative.html">ISurfaceImageSourceManagerNative</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.ISurfaceImageSourceNative.html">ISurfaceImageSourceNative</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.ISurfaceImageSourceNativeWithD2D.html">ISurfaceImageSourceNativeWithD2D</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.ISwapChainBackgroundPanelNative.html">ISwapChainBackgroundPanelNative</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.ISwapChainPanelNative.html">ISwapChainPanelNative</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.PrintDocumentPackageTarget.html">PrintDocumentPackageTarget</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.PrintDocumentPackageTargetFactory.html">PrintDocumentPackageTargetFactory</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.AnalysisTransform.html">AnalysisTransform</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.EffectContext.html">EffectContext</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.Factory.html">Factory</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.GdiInteropRenderTarget.html">GdiInteropRenderTarget</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.Multithread.html">Multithread</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.PrintControl.html">PrintControl</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.Properties.html">Properties</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.RenderInformation.html">RenderInformation</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.Resource.html">Resource</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.ResourceTexture.html">ResourceTexture</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.TransformGraph.html">TransformGraph</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.VertexBuffer.html">VertexBuffer</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct3D11.Blob.html">Blob</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct3D11.Device.html">Device</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct3D11.DeviceChild.html">DeviceChild</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct3D11.DeviceMultithread.html">DeviceMultithread</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Direct3D11.UserDefinedAnnotation.html">UserDefinedAnnotation</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.BitmapRenderTarget.html">BitmapRenderTarget</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.ColorGlyphRunEnumerator.html">ColorGlyphRunEnumerator</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.Factory.html">Factory</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.Font.html">Font</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.FontCollection.html">FontCollection</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.FontFace.html">FontFace</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.FontFallback.html">FontFallback</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.FontFallbackBuilder.html">FontFallbackBuilder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.FontFile.html">FontFile</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.FontList.html">FontList</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.html">GdiInterop</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.GlyphRunAnalysis.html">GlyphRunAnalysis</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.LocalizedStrings.html">LocalizedStrings</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.NumberSubstitution.html">NumberSubstitution</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.RenderingParams.html">RenderingParams</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.TextAnalyzer.html">TextAnalyzer</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.DirectWrite.Typography.html">Typography</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.Storage.PropertyBag.html">PropertyBag</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapCodecProgressNotification.html">BitmapCodecProgressNotification</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapDecoder.html">BitmapDecoder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapEncoder.html">BitmapEncoder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapFrameEncode.html">BitmapFrameEncode</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapLock.html">BitmapLock</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapSource.html">BitmapSource</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.BitmapSourceTransform.html">BitmapSourceTransform</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.ColorContext.html">ColorContext</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.ComponentInfo.html">ComponentInfo</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.DdsDecoder.html">DdsDecoder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.DdsEncoder.html">DdsEncoder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.DdsFrameDecode.html">DdsFrameDecode</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.DevelopRawNotificationCallback.html">DevelopRawNotificationCallback</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.EnumMetadataItem.html">EnumMetadataItem</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.FastMetadataEncoder.html">FastMetadataEncoder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.ImageEncoder.html">ImageEncoder</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.ImagingFactory.html">ImagingFactory</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.MetadataQueryReader.html">MetadataQueryReader</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.Palette.html">Palette</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.PlanarBitmapFrameEncode.html">PlanarBitmapFrameEncode</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.PlanarBitmapSourceTransform.html">PlanarBitmapSourceTransform</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.ProgressCallback.html">ProgressCallback</a></div>
      <div class="level4"><a class="xref" href="C1.Util.DX.WIC.ProgressiveLevelControl.html">ProgressiveLevelControl</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><a class="xref" href="C1.Util.DX.IUnknown.html">IUnknown</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_ComObject_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ComObject : CppObject, IDisposable, IUnknown</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ComObject
    Inherits CppObject
    Implements IDisposable, IUnknown</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_ComObject__ctor_System_IntPtr_" data-uid="C1.Util.DX.ComObject.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.ComObject.-ctor.html#C1_Util_DX_ComObject__ctor_System_IntPtr_">ComObject(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject__ctor_System_Object_" data-uid="C1.Util.DX.ComObject.#ctor(System.Object)">
          <a class="xref" href="C1.Util.DX.ComObject.-ctor.html#C1_Util_DX_ComObject__ctor_System_Object_">ComObject(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a> class from a IUnknown object.</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_ComObject_As__1_System_IntPtr_" data-uid="C1.Util.DX.ComObject.As``1(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.ComObject.As.html#C1_Util_DX_ComObject_As__1_System_IntPtr_">As&lt;T&gt;(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Queries a managed object for a particular COM interface support (This method is a shortcut to <a class="xref" href="C1.Util.DX.ComObject.QueryInterface.html#C1_Util_DX_ComObject_QueryInterface_System_Guid_System_IntPtr__">QueryInterface(Guid, out IntPtr)</a>)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_As__1_System_Object_" data-uid="C1.Util.DX.ComObject.As``1(System.Object)">
          <a class="xref" href="C1.Util.DX.ComObject.As.html#C1_Util_DX_ComObject_As__1_System_Object_">As&lt;T&gt;(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Queries a managed object for a particular COM interface support (This method is a shortcut to <a class="xref" href="C1.Util.DX.ComObject.QueryInterface.html#C1_Util_DX_ComObject_QueryInterface_System_Guid_System_IntPtr__">QueryInterface(Guid, out IntPtr)</a>)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_Dispose_System_Boolean_" data-uid="C1.Util.DX.ComObject.Dispose(System.Boolean)">
          <a class="xref" href="C1.Util.DX.ComObject.Dispose.html#C1_Util_DX_ComObject_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_ComObject_EqualsComObject__1___0___0_" data-uid="C1.Util.DX.ComObject.EqualsComObject``1(``0,``0)">
          <a class="xref" href="C1.Util.DX.ComObject.EqualsComObject.html#C1_Util_DX_ComObject_EqualsComObject__1___0___0_">EqualsComObject&lt;T&gt;(T, T)</a>
        </td>
        <td class="markdown level1 summary"><p>Compares 2 COM objects and return true if the native pointer is the same.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_NativePointerUpdated_System_IntPtr_" data-uid="C1.Util.DX.ComObject.NativePointerUpdated(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.ComObject.NativePointerUpdated.html#C1_Util_DX_ComObject_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_ComObject_NativePointerUpdating" data-uid="C1.Util.DX.ComObject.NativePointerUpdating">
          <a class="xref" href="C1.Util.DX.ComObject.NativePointerUpdating.html#C1_Util_DX_ComObject_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_ComObject_QueryInterface_System_Guid_System_IntPtr__" data-uid="C1.Util.DX.ComObject.QueryInterface(System.Guid,System.IntPtr@)">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterface.html#C1_Util_DX_ComObject_QueryInterface_System_Guid_System_IntPtr__">QueryInterface(Guid, out IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Query this instance for a particular COM GUID/interface support.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_QueryInterfaceFrom__1___0_" data-uid="C1.Util.DX.ComObject.QueryInterfaceFrom``1(``0)">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterfaceFrom.html#C1_Util_DX_ComObject_QueryInterfaceFrom__1___0_">QueryInterfaceFrom&lt;T&gt;(T)</a>
        </td>
        <td class="markdown level1 summary"><p>Query Interface for a particular interface support and attach to the given instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_QueryInterfaceOrNull_System_Guid_" data-uid="C1.Util.DX.ComObject.QueryInterfaceOrNull(System.Guid)">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterfaceOrNull.html#C1_Util_DX_ComObject_QueryInterfaceOrNull_System_Guid_">QueryInterfaceOrNull(Guid)</a>
        </td>
        <td class="markdown level1 summary"><p>Query instance for a particular COM GUID/interface support.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_QueryInterfaceOrNull__1" data-uid="C1.Util.DX.ComObject.QueryInterfaceOrNull``1">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterfaceOrNull.html#C1_Util_DX_ComObject_QueryInterfaceOrNull__1">QueryInterfaceOrNull&lt;T&gt;()</a>
        </td>
        <td class="markdown level1 summary"><p>Query Interface for a particular interface support.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_QueryInterfaceOrNull__1_System_IntPtr_" data-uid="C1.Util.DX.ComObject.QueryInterfaceOrNull``1(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterfaceOrNull.html#C1_Util_DX_ComObject_QueryInterfaceOrNull__1_System_IntPtr_">QueryInterfaceOrNull&lt;T&gt;(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Queries a managed object for a particular COM interface support.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_QueryInterface__1" data-uid="C1.Util.DX.ComObject.QueryInterface``1">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterface.html#C1_Util_DX_ComObject_QueryInterface__1">QueryInterface&lt;T&gt;()</a>
        </td>
        <td class="markdown level1 summary"><p>Query this instance for a particular COM interface support.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_ComObject_QueryInterface__1_System_Object_" data-uid="C1.Util.DX.ComObject.QueryInterface``1(System.Object)">
          <a class="xref" href="C1.Util.DX.ComObject.QueryInterface.html#C1_Util_DX_ComObject_QueryInterface__1_System_Object_">QueryInterface&lt;T&gt;(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Queries a managed object for a particular COM interface support.</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_ComObject_op_Explicit_System_IntPtr__C1_Util_DX_ComObject" data-uid="C1.Util.DX.ComObject.op_Explicit(System.IntPtr)~C1.Util.DX.ComObject">
          <a class="xref" href="C1.Util.DX.ComObject.op_Explicit.html#C1_Util_DX_ComObject_op_Explicit_System_IntPtr__C1_Util_DX_ComObject">explicit operator ComObject(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Performs an explicit conversion from <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a> to <a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
