with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTableSection4_Interface is

   procedure Initialize (This : in out IHTMLTableSection4_Type) is
   begin
      Set_IID (This, IID_IHTMLTableSection4);
   end Initialize;

   function Pointer (This : IHTMLTableSection4_Type)
     return Pointer_To_IHTMLTableSection4
   is
   begin
      return To_Pointer_To_IHTMLTableSection4 (Address (This));
   end Pointer;

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

   procedure Put_ch
     (This : IHTMLTableSection4_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_ch
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_ch;

   function Get_ch
     (This : IHTMLTableSection4_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_ch
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_ch;

   procedure Put_chOff
     (This : IHTMLTableSection4_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_chOff
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_chOff;

   function Get_chOff
     (This : IHTMLTableSection4_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_chOff
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_chOff;

   function insertRow
     (This  : IHTMLTableSection4_Type;
      index : Interfaces.C.long)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.insertRow
         (Pointer (This),
          index,
          RetVal'Unchecked_Access));

      return RetVal;
   end insertRow;

   procedure deleteRow
     (This  : IHTMLTableSection4_Type;
      index : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.deleteRow
         (Pointer (This),
          index));

   end deleteRow;

end MSHTML.IHTMLTableSection4_Interface;

