![]() |
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
(PureBasic) Transition from Imap.ThreadCmd to Imap.QueryThreadProvides instructions for replacing deprecated ThreadCmd method calls with QueryThread. Note: This example requires Chilkat v11.0.0 or greater.
IncludeFile "CkImap.pb" IncludeFile "CkJsonObject.pb" Procedure ChilkatExample() imap.i = CkImap::ckCreate() If imap.i = 0 Debug "Failed to create object." ProcedureReturn EndIf ; ... ; ... threadAlg.s = "REFERENCES" charset.s = "UTF-8" searchCriteria.s = "SUBJECT a" bUid.i = 1 ; ------------------------------------------------------------------------ ; The ThreadCmd method is deprecated: jsonObj.i = CkImap::ckThreadCmd(imap,threadAlg,charset,searchCriteria,bUid) If CkImap::ckLastMethodSuccess(imap) = 0 Debug CkImap::ckLastErrorText(imap) CkImap::ckDispose(imap) ProcedureReturn EndIf ; ... ; ... CkJsonObject::ckDispose(jsonObj) ; ------------------------------------------------------------------------ ; Do the equivalent using QueryThread. ; Your application creates a new, empty JsonObject object which is passed ; in the last argument and filled upon success. CkImap::setCkSearchCharset(imap, "UTF-8") json.i = CkJsonObject::ckCreate() If json.i = 0 Debug "Failed to create object." ProcedureReturn EndIf success.i = CkImap::ckQueryThread(imap,threadAlg,searchCriteria,bUid,json) If success = 0 Debug CkImap::ckLastErrorText(imap) CkImap::ckDispose(imap) CkJsonObject::ckDispose(json) ProcedureReturn EndIf CkImap::ckDispose(imap) CkJsonObject::ckDispose(json) ProcedureReturn EndProcedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.