with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLDOMChildrenCollection_Interface is

   procedure Initialize (This : in out IHTMLDOMChildrenCollection_Type) is
   begin
      Set_IID (This, IID_IHTMLDOMChildrenCollection);
   end Initialize;

   function Pointer (This : IHTMLDOMChildrenCollection_Type)
     return Pointer_To_IHTMLDOMChildrenCollection
   is
   begin
      return To_Pointer_To_IHTMLDOMChildrenCollection (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_length;

   function Getu_newEnum
     (This : IHTMLDOMChildrenCollection_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 item
     (This   : IHTMLDOMChildrenCollection_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.item
         (Pointer (This),
          index,
          RetVal'Unchecked_Access));

      return RetVal;
   end item;

end MSHTML.IHTMLDOMChildrenCollection_Interface;

