with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLFramesCollection2_Interface is

   procedure Initialize (This : in out IHTMLFramesCollection2_Type) is
   begin
      Set_IID (This, IID_IHTMLFramesCollection2);
   end Initialize;

   function Pointer (This : IHTMLFramesCollection2_Type)
     return Pointer_To_IHTMLFramesCollection2
   is
   begin
      return To_Pointer_To_IHTMLFramesCollection2 (Address (This));
   end Pointer;

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

   function item
     (This       : IHTMLFramesCollection2_Type;
      pvarIndex  : access GNATCOM.Types.VARIANT :=
        GNATCOM.Types.PVARIANT_MISSING)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.item
         (Pointer (This),
          pvarIndex,
          RetVal'Unchecked_Access));

      return RetVal;
   end item;

   function Get_length
     (This : IHTMLFramesCollection2_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_length
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_length;

end MSHTML.IHTMLFramesCollection2_Interface;

