Delphi DLL Requires Chilkat v11.0.0+
Delphi DLL
Transition from Imap.ListSubscribed to Imap.MbxList
Provides instructions for replacing deprecated ListSubscribed method calls with MbxList.Chilkat Delphi DLL Downloads
var
success: Boolean;
imap: HCkImap;
reference: PWideChar;
mbxPattern: PWideChar;
mboxesObj: HCkMailboxes;
subscribed: Boolean;
mboxes: HCkMailboxes;
begin
success := False;
imap := CkImap_Create();
// ...
// ...
reference := '';
mbxPattern := '*';
// ------------------------------------------------------------------------
// The ListSubscribed method is deprecated:
// Lists only subscribed mailboxes.
mboxesObj := CkImap_ListSubscribed(imap,reference,mbxPattern);
if (CkImap_getLastMethodSuccess(imap) = False) then
begin
Memo1.Lines.Add(CkImap__lastErrorText(imap));
Exit;
end;
// ...
// ...
CkMailboxes_Dispose(mboxesObj);
// ------------------------------------------------------------------------
// Do the equivalent using MbxList.
// Your application creates a new, empty Mailboxes object which is passed
// in the last argument and filled upon success.
// Lists only subscribed mailboxes.
subscribed := True;
mboxes := CkMailboxes_Create();
success := CkImap_MbxList(imap,subscribed,reference,mbxPattern,mboxes);
if (success = False) then
begin
Memo1.Lines.Add(CkImap__lastErrorText(imap));
Exit;
end;
CkImap_Dispose(imap);
CkMailboxes_Dispose(mboxes);