![]() |
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 Email.GetDt to Email.EmailDateStrProvides instructions for replacing deprecated GetDt method calls with EmailDateStr. Note: This example requires Chilkat v11.0.0 or greater.
Use ChilkatAx-win32.pkg Procedure Test Handle hoEmail Variant vDateTimeObj Handle hoDateTimeObj Handle hoDt Boolean iSuccess String sTemp1 Boolean bTemp1 Get Create (RefClass(cComChilkatEmail)) To hoEmail If (Not(IsComObjectCreated(hoEmail))) Begin Send CreateComObject of hoEmail End // ... // ... // ------------------------------------------------------------------------ // The GetDt method is deprecated: Get ComGetDt Of hoEmail To vDateTimeObj If (IsComObject(vDateTimeObj)) Begin Get Create (RefClass(cComCkDateTime)) To hoDateTimeObj Set pvComObject Of hoDateTimeObj To vDateTimeObj End Get ComLastMethodSuccess Of hoEmail To bTemp1 If (bTemp1 = False) Begin Get ComLastErrorText Of hoEmail To sTemp1 Showln sTemp1 Procedure_Return End // ... // ... Send Destroy of hoDateTimeObj // ------------------------------------------------------------------------ // Do the equivalent using EmailDateStr. Get Create (RefClass(cComCkDateTime)) To hoDt If (Not(IsComObjectCreated(hoDt))) Begin Send CreateComObject of hoDt End Get ComEmailDateStr Of hoEmail To sTemp1 Get ComSetFromRfc822 Of hoDt sTemp1 To iSuccess End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.