![]() |
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.Sort to Imap.QueryMbxProvides instructions for replacing deprecated Sort method calls with QueryMbx. Note: This example requires Chilkat v11.0.0 or greater.
Use ChilkatAx-win32.pkg Procedure Test Handle hoImap String sSearchCriteria Boolean iBUid String sSortCriteria Variant vMsgSetObj Handle hoMsgSetObj Variant vMset Handle hoMset Boolean iSuccess String sTemp1 Boolean bTemp1 Get Create (RefClass(cComChilkatImap)) To hoImap If (Not(IsComObjectCreated(hoImap))) Begin Send CreateComObject of hoImap End // ... // ... Move "FROM bob@example.com" To sSearchCriteria Move True To iBUid Move "DATE SUBJECT" To sSortCriteria // ------------------------------------------------------------------------ // The Sort method is deprecated: Get ComSort Of hoImap sSortCriteria "utf-8" sSearchCriteria iBUid To vMsgSetObj If (IsComObject(vMsgSetObj)) Begin Get Create (RefClass(cComChilkatMessageSet)) To hoMsgSetObj Set pvComObject Of hoMsgSetObj To vMsgSetObj 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 hoMsgSetObj // ------------------------------------------------------------------------ // Do the equivalent using QueryMbx. // Your application creates a new, empty MessageSet object which is passed // in the last argument and filled upon success. // The following properties are used instead of function arguments. Set ComSortCriteria Of hoImap To "DATE SUBJECT" Set ComSearchCharset Of hoImap To "utf-8" 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 sSearchCriteria iBUid vMset 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.