How use non-visual components in ActiveX Library (COM Server)
I am writing an ActiveX Library using Delphi,
but there is a problem need your hellp.
How to create or use Delphi non-visual compoents in ActiveX Library (DLL),
bellowing is my source code:
------- Part of Source code -----
uses
ComObj, HelloDll_TLB, classes, tcpip;
TTAXSMTP = class(TAutoObject, ITAXSMTP)
Private
SMTPServer: T_SMTP; <----- here is a componet
Mail: T_Mail; <----- here is a component
protected
procedure Execute; safecall;
procedure Init; safecall;
procedure Free; safecall;
end;
implementation
uses ComServ, SysUtils;
procedure TTAXSMTP.Init;
begin
SMTPServer.Create (self); <---- I can't create it, because TAXSmtp
is not
compaitiable with TComponent
Mail.Create(self); <---- I can't create it, because
TAXSmtp
is not
compaitiable with TComponent
Mail.SMTP := SmtpServer;
Mail.Recipients.Clear;
Mail.Body.Clear;
end;
----- End of Source Code ----
If you know how to slove that, please tell me, thank you!
Regards,
Jolios Lin