![]() |
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.FetchBundle to Imap.FetchMsgSetProvides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet. Note: This example requires Chilkat v11.0.0 or greater.
Use ChilkatAx-win32.pkg Procedure Test Handle hoImap Variant vMset Handle hoMset Boolean iSuccess 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 // ... // ... Get Create (RefClass(cComChilkatMessageSet)) To hoMset If (Not(IsComObjectCreated(hoMset))) Begin Send CreateComObject of hoMset End Get pvComObject of hoMset to vMset Get ComQueryMbx Of hoImap "FROM joe@example.com" True vMset To iSuccess // ... // ... // ------------------------------------------------------------------------ // The FetchBundle method is deprecated: Get pvComObject of hoMset to vMset Get ComFetchBundle Of hoImap vMset 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 FetchMsgSet. // 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 hoMset to vMset Get pvComObject of hoBundleOut to vBundleOut Get ComFetchMsgSet Of hoImap iHeadersOnly vMset 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.