home *** CD-ROM | disk | FTP | other *** search
- unit SubMain;
-
- interface
-
- uses
- ComObj, ActiveX, Subscriber_TLB, StdVcl, Publisher_TLB;
-
- type
- TSubObj = class(TAutoObject, ISubObj, IEventObj)
- protected
- function MyEvent(const EventParam: WideString): HResult; safecall;
- { Protected declarations }
- end;
-
- implementation
-
- uses ComServ, Windows;
-
- function TSubObj.MyEvent(const EventParam: WideString): HResult;
- begin
- MessageBox(0, PChar(string(EventParam)), 'COM+ Event!', MB_OK);
- Result := S_OK;
- end;
-
- initialization
- TAutoObjectFactory.Create(ComServer, TSubObj, Class_SubObj,
- ciMultiInstance, tmApartment);
- end.
-