with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLDOMNode2_Interface is

   procedure Initialize (This : in out IHTMLDOMNode2_Type) is
   begin
      Set_IID (This, IID_IHTMLDOMNode2);
   end Initialize;

   function Pointer (This : IHTMLDOMNode2_Type)
     return Pointer_To_IHTMLDOMNode2
   is
   begin
      return To_Pointer_To_IHTMLDOMNode2 (Address (This));
   end Pointer;

   procedure Attach (This    : in out IHTMLDOMNode2_Type;
                     Pointer : in     Pointer_To_IHTMLDOMNode2)
   is
   begin
      Attach (This, GNATCOM.IInterface.To_Pointer_To_IUnknown
              (Pointer.all'Address));
   end Attach;

   function Get_ownerDocument
     (This : IHTMLDOMNode2_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_ownerDocument
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_ownerDocument;

end MSHTML.IHTMLDOMNode2_Interface;

