with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLInputFileElement_Interface is

   procedure Initialize (This : in out IHTMLInputFileElement_Type) is
   begin
      Set_IID (This, IID_IHTMLInputFileElement);
   end Initialize;

   function Pointer (This : IHTMLInputFileElement_Type)
     return Pointer_To_IHTMLInputFileElement
   is
   begin
      return To_Pointer_To_IHTMLInputFileElement (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_type;

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

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

   end Put_name;

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

      return RetVal;
   end Get_name;

   procedure Put_status
     (This : IHTMLInputFileElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_status
         (Pointer (This),
          p));

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

   end Put_status;

   function Get_status
     (This : IHTMLInputFileElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_status
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_status;

   procedure Put_disabled
     (This : IHTMLInputFileElement_Type;
      p    : GNATCOM.Types.VARIANT_BOOL)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_disabled
         (Pointer (This),
          p));

   end Put_disabled;

   function Get_disabled
     (This : IHTMLInputFileElement_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_disabled
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_disabled;

   function Get_form
     (This : IHTMLInputFileElement_Type)
     return Pointer_To_IHTMLFormElement
   is
       RetVal : aliased Pointer_To_IHTMLFormElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_form
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_form;

   procedure Put_size
     (This : IHTMLInputFileElement_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_size
         (Pointer (This),
          p));

   end Put_size;

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

      return RetVal;
   end Get_size;

   procedure Put_maxLength
     (This : IHTMLInputFileElement_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_maxLength
         (Pointer (This),
          p));

   end Put_maxLength;

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

      return RetVal;
   end Get_maxLength;

   procedure uselect
     (This : IHTMLInputFileElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.uselect
         (Pointer (This)));

   end uselect;

   procedure Put_onchange
     (This : IHTMLInputFileElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onchange
         (Pointer (This),
          p));

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

   end Put_onchange;

   function Get_onchange
     (This : IHTMLInputFileElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onchange
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onchange;

   procedure Put_onselect
     (This : IHTMLInputFileElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onselect
         (Pointer (This),
          p));

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

   end Put_onselect;

   function Get_onselect
     (This : IHTMLInputFileElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onselect
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onselect;

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

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

   end Put_value;

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

      return RetVal;
   end Get_value;

end MSHTML.IHTMLInputFileElement_Interface;

