{$INCLUDE t_main.inc} unit u_corsvmsg; interface uses Windows, ActiveX, Classes, ComObj, t_main_TLB, StdVcl; type Tcorsvmsg = class(TAutoObject, Icorsvmsg) protected function rsvmsg(const msg: WideString): HResult; stdcall; end; implementation uses ComServ, u_main; { Tcorsvmsg } function Tcorsvmsg.rsvmsg(const msg: WideString): HResult; begin getmsg(msg); end; initialization TAutoObjectFactory.Create(ComServer, Tcorsvmsg, Class_corsvmsg, ciMultiInstance, tmApartment); end.