![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Transition from Imap.FetchChunk to Imap.FetchRangeProvides instructions for replacing deprecated FetchChunk method calls with FetchRange. Note: This example requires Chilkat v11.0.0 or greater.
Use ChilkatAx-win32.pkg Procedure Test Handle hoImap Integer iStartSeqNum Integer iCount Variant vFailedSet Handle hoFailedSet Variant vFetchedSet Handle hoFetchedSet Variant vBundleObj Handle hoBundleObj Boolean iHeadersOnly Variant vBundleOut Handle hoBundleOut Boolean iSuccess String sTemp1 Boolean bTemp1 Get Create (RefClass(cComChilkatImap)) To hoImap If (Not(IsComObjectCreated(hoImap))) Begin Send CreateComObject of hoImap End // ... // ... Move 1 To iStartSeqNum Move 5 To iCount Get Create (RefClass(cComChilkatMessageSet)) To hoFailedSet If (Not(IsComObjectCreated(hoFailedSet))) Begin Send CreateComObject of hoFailedSet End Get Create (RefClass(cComChilkatMessageSet)) To hoFetchedSet If (Not(IsComObjectCreated(hoFetchedSet))) Begin Send CreateComObject of hoFetchedSet End // ------------------------------------------------------------------------ // The FetchChunk method is deprecated: Get pvComObject of hoFailedSet to vFailedSet Get pvComObject of hoFetchedSet to vFetchedSet Get ComFetchChunk Of hoImap iStartSeqNum iCount vFailedSet vFetchedSet To vBundleObj If (IsComObject(vBundleObj)) Begin Get Create (RefClass(cComChilkatEmailBundle)) To hoBundleObj Set pvComObject Of hoBundleObj To vBundleObj End Get ComLastMethodSuccess Of hoImap To bTemp1 If (bTemp1 = False) Begin Get ComLastErrorText Of hoImap To sTemp1 Showln sTemp1 Procedure_Return End // ... // ... Send Destroy of hoBundleObj // ------------------------------------------------------------------------ // Do the equivalent using FetchRange. // Your application creates a new, empty EmailBundle object which is passed // in the last argument and filled upon success. Move False To iHeadersOnly Get Create (RefClass(cComChilkatEmailBundle)) To hoBundleOut If (Not(IsComObjectCreated(hoBundleOut))) Begin Send CreateComObject of hoBundleOut End Get pvComObject of hoBundleOut to vBundleOut Get ComFetchRange Of hoImap iHeadersOnly iStartSeqNum iCount vBundleOut To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoImap To sTemp1 Showln sTemp1 Procedure_Return End End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.