Sample code for 30+ languages & platforms
Delphi DLL Requires Chilkat v11.0.0+

Transition from Imap.GetAllUids to Imap.QueryMbx

Provides instructions for replacing deprecated GetAllUids method calls with QueryMbx.

Chilkat Delphi DLL Downloads

Delphi DLL
var
success: Boolean;
imap: HCkImap;
msgSetObj: HCkMessageSet;
mset: HCkMessageSet;

begin
success := False;

imap := CkImap_Create();

//  ...
//  ...

//  ------------------------------------------------------------------------
//  The GetAllUids method is deprecated:

msgSetObj := CkImap_GetAllUids(imap);
if (CkImap_getLastMethodSuccess(imap) = False) then
  begin
    Memo1.Lines.Add(CkImap__lastErrorText(imap));
    Exit;
  end;

//  ...
//  ...

CkMessageSet_Dispose(msgSetObj);

//  ------------------------------------------------------------------------
//  Do the equivalent using QueryMbx.
//  Your application creates a new, empty MessageSet object which is passed 
//  in the last argument and filled upon success.

mset := CkMessageSet_Create();
success := CkImap_QueryMbx(imap,'ALL',True,mset);
if (success = False) then
  begin
    Memo1.Lines.Add(CkImap__lastErrorText(imap));
    Exit;
  end;

CkImap_Dispose(imap);
CkMessageSet_Dispose(mset);