Subscriber.pas
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit Subscriber;
  2. {$WARN SYMBOL_PLATFORM OFF}
  3. interface
  4. uses
  5.   ComObj, ActiveX, EvtSubscriber_TLB, StdVcl, MdComEvents_TLB;
  6. type
  7.   TInformSubscriber = class(TAutoObject, IMdInform)
  8.   protected
  9.     procedure Informs(Code: Integer; const Message: WideString); safecall;
  10.   end;
  11. implementation
  12. uses ComServ, Dialogs, SysUtils;
  13. procedure TInformSubscriber.Informs(Code: Integer;
  14.   const Message: WideString);
  15. begin
  16.   ShowMessage ('Message <' + IntToStr (Code) + '>: ' + Message);
  17. end;
  18. initialization
  19.   TAutoObjectFactory.Create(ComServer, TInformSubscriber, Class_InformSubscriber,
  20.     ciMultiInstance, tmApartment);
  21. end.