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

Transition from Cert.GetValidToDt to Cert.ValidToStr

Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkCertW.h>
#include <CkDateTimeW.h>

void ChilkatSample(void)
    {
    CkCertW cert;

    //  ------------------------------------------------------------------------
    //  The GetValidToDt method is deprecated:

    CkDateTimeW *ckdt1 = cert.GetValidToDt();
    if (cert.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",cert.lastErrorText());
        return;
    }

    //  ...
    //  ...

    delete ckdt1;

    //  ------------------------------------------------------------------------
    //  Do the equivalent using the ValidToStr property

    CkDateTimeW ckdt2;
    ckdt2.SetFromRfc822(cert.validToStr());
    }