with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IDocumentRange_Interface is

   procedure Initialize (This : in out IDocumentRange_Type) is
   begin
      Set_IID (This, IID_IDocumentRange);
   end Initialize;

   function Pointer (This : IDocumentRange_Type)
     return Pointer_To_IDocumentRange
   is
   begin
      return To_Pointer_To_IDocumentRange (Address (This));
   end Pointer;

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

   function createRange
     (This            : IDocumentRange_Type)
     return Pointer_To_IHTMLDOMRange
   is
       RetVal : aliased Pointer_To_IHTMLDOMRange;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createRange
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createRange;

end MSHTML.IDocumentRange_Interface;

