Delphi ActiveX
Delphi ActiveX
Transition from Email.GetLinkedDomains to Email.LinkedDomains
Provides instructions for replacing deprecated GetLinkedDomains method calls with LinkedDomains.Chilkat Delphi ActiveX Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Integer;
email: TChilkatEmail;
sa: ICkStringArray;
st: TChilkatStringTable;
begin
success := 0;
email := TChilkatEmail.Create(Self);
// ...
// ...
// ------------------------------------------------------------------------
// The GetLinkedDomains method is deprecated:
sa := email.GetLinkedDomains();
if (email.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(email.LastErrorText);
Exit;
end;
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using LinkedDomains.
// Your application creates a new, empty StringTable object which is passed
// in the last argument and filled upon success.
st := TChilkatStringTable.Create(Self);
success := email.LinkedDomains(st.ControlInterface);
if (success = 0) then
begin
Memo1.Lines.Add(email.LastErrorText);
Exit;
end;
end;