Sample code for 30+ languages & platforms
Unicode C++

Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString

Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkMailManW.h>
#include <CkEmailBundleW.h>

void ChilkatSample(void)
    {
    bool success = false;

    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;
    success = bundle.LoadXmlString(xmlBundleStr);
    if (success == false) {
        wprintf(L"%s\n",bundle.lastErrorText());
        return;
    }
    }