(Unicode C++) Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString. Note: This example requires Chilkat v11.0.0 or greater.
#include <CkMailManW.h>
#include <CkEmailBundleW.h>
void ChilkatSample(void)
{
CkMailManW mailman;
// ...
// ...
const wchar_t *xmlBundleStr = L"...";
// ------------------------------------------------------------------------
// The LoadXmlString method is deprecated:
CkEmailBundleW *bundleObj = mailman.LoadXmlString(xmlBundleStr);
if (mailman.get_LastMethodSuccess() == false) {
wprintf(L"%s\n",mailman.lastErrorText());
return;
}
// ...
// ...
delete bundleObj;
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXmlString.
CkEmailBundleW bundle;
bool success = bundle.LoadXmlString(xmlBundleStr);
if (success == false) {
wprintf(L"%s\n",bundle.lastErrorText());
return;
}
}
|