with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLDocument_Interface is

   procedure Initialize (This : in out IHTMLDocument_Type) is
   begin
      Set_IID (This, IID_IHTMLDocument);
   end Initialize;

   function Pointer (This : IHTMLDocument_Type)
     return Pointer_To_IHTMLDocument
   is
   begin
      return To_Pointer_To_IHTMLDocument (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_Script;

end MSHTML.IHTMLDocument_Interface;

