Sample code for 30+ languages & platforms
Visual FoxPro Requires Chilkat v11.0.0+

Transition from Imap.GetAllUids to Imap.QueryMbx

Provides instructions for replacing deprecated GetAllUids method calls with QueryMbx.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loImap
LOCAL loMsgSetObj
LOCAL loMset

lnSuccess = 0

loImap = CreateObject('Chilkat.Imap')

*  ...
*  ...

*  ------------------------------------------------------------------------
*  The GetAllUids method is deprecated:

loMsgSetObj = loImap.GetAllUids()
IF (loImap.LastMethodSuccess = 0) THEN
    ? loImap.LastErrorText
    RELEASE loImap
    CANCEL
ENDIF

*  ...
*  ...

RELEASE loMsgSetObj

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

loMset = CreateObject('Chilkat.MessageSet')
lnSuccess = loImap.QueryMbx("ALL",1,loMset)
IF (lnSuccess = 0) THEN
    ? loImap.LastErrorText
    RELEASE loImap
    RELEASE loMset
    CANCEL
ENDIF

RELEASE loImap
RELEASE loMset