![]() |
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
(Unicode C) Transition from Crypt2.LastJsonData to Crypt2.GetLastJsonDataProvides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData. Note: This example requires Chilkat v11.0.0 or greater.
#include <C_CkCrypt2W.h> #include <C_CkJsonObjectW.h> void ChilkatSample(void) { HCkCrypt2W crypt2; HCkJsonObjectW jsonObj; HCkJsonObjectW jsonOut; BOOL success; crypt2 = CkCrypt2W_Create(); // ... // ... // ------------------------------------------------------------------------ // The LastJsonData method is deprecated: jsonObj = CkCrypt2W_LastJsonData(crypt2); if (CkCrypt2W_getLastMethodSuccess(crypt2) == FALSE) { wprintf(L"%s\n",CkCrypt2W_lastErrorText(crypt2)); CkCrypt2W_Dispose(crypt2); return; } // ... // ... CkJsonObjectW_Dispose(jsonObj); // ------------------------------------------------------------------------ // Do the equivalent using GetLastJsonData. // Your application creates a new, empty JsonObject object which is passed // in the last argument and filled upon success. jsonOut = CkJsonObjectW_Create(); success = CkCrypt2W_GetLastJsonData(crypt2,jsonOut); if (success == FALSE) { wprintf(L"%s\n",CkCrypt2W_lastErrorText(crypt2)); CkCrypt2W_Dispose(crypt2); CkJsonObjectW_Dispose(jsonOut); return; } CkCrypt2W_Dispose(crypt2); CkJsonObjectW_Dispose(jsonOut); } |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.