with GNATCOM.Errors;

package body MSHTML.IBlockFormats_Interface is

   procedure Initialize (This : in out IBlockFormats_Type) is
   begin
      Set_IID (This, IID_IBlockFormats);
   end Initialize;

   function Pointer (This : IBlockFormats_Type)
     return Pointer_To_IBlockFormats
   is
   begin
      return To_Pointer_To_IBlockFormats (Address (This));
   end Pointer;

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

   function Getu_newEnum
     (This : IBlockFormats_Type)
     return GNATCOM.Types.Pointer_To_IUnknown
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IUnknown;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Getu_newEnum
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Getu_newEnum;

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

      return RetVal;
   end Get_Count;

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

      return RetVal;
   end item;

end MSHTML.IBlockFormats_Interface;

