title: What is IViewObject and How is it Used in C#
body: <p>I'm trying to do a few internet explorer automation tasks and it's requiring me to use IViewObject. What is IViewObject? Where can I find it's definition?</p>
  
  <p>I've been google-ing and everything I find has a different interface definition for IViewObject. Different methods or different parameters going into the same methods.</p>
  
  <p>How do I know what interface definition to use with internet explorer?</p>
  
  <p>This is one definition I found on <a href="http://www.pinvoke.net/default.aspx/Interfaces/IViewObject.html" rel="nofollow noreferrer">pinvoke.net</a></p>
  
  <pre><code>[GuidAttribute( "0000010d-0000-0000-C000-000000000046" )]
  [InterfaceTypeAttribute( ComInterfaceType.InterfaceIsIUnknown )]
  [ComImportAttribute()]
  public interface IViewObject
  {
      void Draw( [MarshalAs( UnmanagedType.U4 )] int dwDrawAspect, int lindex, IntPtr pvAspect, DVTARGETDEVICE ptd, IntPtr hdcTargetDev, IntPtr hdcDraw, COMRECT lprcBounds, COMRECT lprcWBounds, IntPtr pfnContinue, int dwContinue );
      int GetColorSet( [MarshalAs( UnmanagedType.U4 )] int dwDrawAspect, int lindex, IntPtr pvAspect, DVTARGETDEVICE ptd, IntPtr hicTargetDev, out tagLOGPALETTE ppColorSet );
      int Freeze( [MarshalAs( UnmanagedType.U4 )] int dwDrawAspect, int lindex, IntPtr pvAspect, out IntPtr pdwFreeze );
      int Unfreeze( [MarshalAs( UnmanagedType.U4 )] int dwFreeze );
      int SetAdvise( [MarshalAs( UnmanagedType.U4 )] int aspects, [MarshalAs( UnmanagedType.U4 )] int advf, [MarshalAs( UnmanagedType.Interface )] IAdviseSink pAdvSink );
      void GetAdvise( [MarshalAs( UnmanagedType.LPArray )] out int[] paspects, [MarshalAs( UnmanagedType.LPArray )] out int[] advf, [MarshalAs( UnmanagedType.LPArray )] out IAdviseSink[] pAdvSink );
  }
  </code></pre>
  
  <p>I would just try this definition, but I get a few types that are unknown: DVTARGETDEVICE, COMRECT, tagLOGPALETTE. So my next question is, what assembly needs to be referenced to use these types?</p>