
with GNATCOM.Errors;

package body MSHTMLHST.ICustomDoc_Interface is

   procedure Initialize (This : in out ICustomDoc_Type) is
   begin
      Set_IID (This, IID_ICustomDoc);
   end Initialize;

   function Pointer (This : ICustomDoc_Type)
		     return Pointer_To_ICustomDoc
   is
   begin
      return To_Pointer_To_ICustomDoc (Address (This));
   end Pointer;

   procedure Attach (This    : in out ICustomDoc_Type;
		     Pointer : in     Pointer_To_ICustomDoc)
   is
   begin
      Attach (This, GNATCOM.Iinterface.To_Pointer_To_IUnknown
	      (Pointer.all'Address));
   end Attach;

   procedure SetUIHandler(
			  This         : in out ICustomDoc_Type;
			  pUIHandler   : Pointer_To_IDocHostUIHandler
			 )
   is
      hr : HRESULT;
   begin
      hr := Pointer(This).Vtbl.SetUIHandler(
					    Pointer (This),
					    pUIHandler
					   );
      GNATCOM.Errors.Error_Check(hr);
   end SetUIHandler;

end MSHTMLHST.ICustomDoc_Interface;
