with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ICanvasPixelArray_Interface is

   procedure Initialize (This : in out ICanvasPixelArray_Type) is
   begin
      Set_IID (This, IID_ICanvasPixelArray);
   end Initialize;

   function Pointer (This : ICanvasPixelArray_Type)
     return Pointer_To_ICanvasPixelArray
   is
   begin
      return To_Pointer_To_ICanvasPixelArray (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_length;

end MSHTML.ICanvasPixelArray_Interface;

