with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLFrameSetElement2_Interface is

   procedure Initialize (This : in out IHTMLFrameSetElement2_Type) is
   begin
      Set_IID (This, IID_IHTMLFrameSetElement2);
   end Initialize;

   function Pointer (This : IHTMLFrameSetElement2_Type)
     return Pointer_To_IHTMLFrameSetElement2
   is
   begin
      return To_Pointer_To_IHTMLFrameSetElement2 (Address (This));
   end Pointer;

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

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

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

   end Put_onbeforeprint;

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

      return RetVal;
   end Get_onbeforeprint;

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

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

   end Put_onafterprint;

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

      return RetVal;
   end Get_onafterprint;

end MSHTML.IHTMLFrameSetElement2_Interface;

