with GNATCOM.Errors;

package body MSHTML.IScriptEventHandler_Interface is

   procedure Initialize (This : in out IScriptEventHandler_Type) is
   begin
      Set_IID (This, IID_IScriptEventHandler);
   end Initialize;

   function Pointer (This : IScriptEventHandler_Type)
     return Pointer_To_IScriptEventHandler
   is
   begin
      return To_Pointer_To_IScriptEventHandler (Address (This));
   end Pointer;

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

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

      return RetVal;
   end FunctionName;

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

      return RetVal;
   end DebugDocumentContext;

   function EventHandlerDispatch
     (This          : IScriptEventHandler_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.EventHandlerDispatch
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end EventHandlerDispatch;

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

      return RetVal;
   end UsesCapture;

   function cookie
     (This       : IScriptEventHandler_Type)
     return GNATCOM.Types.DWORDLONG
   is
       RetVal : aliased GNATCOM.Types.DWORDLONG;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.cookie
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end cookie;

end MSHTML.IScriptEventHandler_Interface;

