Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Imap.FetchChunk to Imap.FetchRange
Provides instructions for replacing deprecated FetchChunk method calls with FetchRange.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oImap
LOCAL nStartSeqNum
LOCAL nCount
LOCAL oFailedSet
LOCAL oFetchedSet
LOCAL oBundleObj
LOCAL nHeadersOnly
LOCAL oBundleOut
nSuccess := 0
oImap := CreateObject("Chilkat.Imap")
// ...
// ...
nStartSeqNum := 1
nCount := 5
oFailedSet := CreateObject("Chilkat.MessageSet")
oFetchedSet := CreateObject("Chilkat.MessageSet")
// ------------------------------------------------------------------------
// The FetchChunk method is deprecated:
oBundleObj := oImap:FetchChunk(nStartSeqNum, nCount, oFailedSet, oFetchedSet)
IF (oImap:LastMethodSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
oFailedSet:destroy()
oFetchedSet:destroy()
RETURN
ENDIF
// ...
// ...
oBundleObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using FetchRange.
// Your application creates a new, empty EmailBundle object which is passed
// in the last argument and filled upon success.
nHeadersOnly := 0
oBundleOut := CreateObject("Chilkat.EmailBundle")
nSuccess := oImap:FetchRange(nHeadersOnly, nStartSeqNum, nCount, oBundleOut)
IF (nSuccess == 0)
? oImap:LastErrorText
oImap:destroy()
oFailedSet:destroy()
oFetchedSet:destroy()
oBundleOut:destroy()
RETURN
ENDIF
oImap:destroy()
oFailedSet:destroy()
oFetchedSet:destroy()
oBundleOut:destroy()