(Unicode C++) Transition from MailMan.LastJsonData to MailMan.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData. Note: This example requires Chilkat v11.0.0 or greater.
#include <CkMailManW.h>
#include <CkJsonObjectW.h>
void ChilkatSample(void)
{
CkMailManW mailman;
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
CkJsonObjectW *jsonObj = mailman.LastJsonData();
if (mailman.get_LastMethodSuccess() == false) {
wprintf(L"%s\n",mailman.lastErrorText());
return;
}
// ...
// ...
delete jsonObj;
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument.
CkJsonObjectW jsonOut;
mailman.GetLastJsonData(jsonOut);
}
|