Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Imap.ThreadCmd to Imap.QueryThread
Provides instructions for replacing deprecated ThreadCmd method calls with QueryThread.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oImap
LOCAL cThreadAlg
LOCAL cCharset
LOCAL cSearchCriteria
LOCAL nBUid
LOCAL oJsonObj
LOCAL oJson
nSuccess := 0
oImap := CreateObject("Chilkat.Imap")
// ...
// ...
cThreadAlg := "REFERENCES"
cCharset := "UTF-8"
cSearchCriteria := "SUBJECT a"
nBUid := 1
// ------------------------------------------------------------------------
// The ThreadCmd method is deprecated:
oJsonObj := oImap:ThreadCmd(cThreadAlg, cCharset, cSearchCriteria, nBUid)
IF (oImap:LastMethodSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
RETURN
ENDIF
// ...
// ...
oJsonObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using QueryThread.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument and filled upon success.
oImap:SearchCharset := "UTF-8"
oJson := CreateObject("Chilkat.JsonObject")
nSuccess := oImap:QueryThread(cThreadAlg, cSearchCriteria, nBUid, oJson)
IF (nSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
oJson:destroy()
RETURN
ENDIF
oImap:destroy()
oJson:destroy()