(Unicode C++) Transition from Email.FindIssuer to Cert.GetIssuer
Provides instructions for replacing deprecated FindIssuer method calls with Cert.GetIssuer. Note: This example requires Chilkat v11.0.0 or greater.
#include <CkEmailW.h>
#include <CkCertW.h>
void ChilkatSample(void)
{
CkEmailW email;
CkCertW cert;
// ...
// ...
// ------------------------------------------------------------------------
// The FindIssuer method is deprecated:
CkCertW *certObj = email.FindIssuer(cert);
if (email.get_LastMethodSuccess() == false) {
wprintf(L"%s\n",email.lastErrorText());
return;
}
// ...
// ...
delete certObj;
// ------------------------------------------------------------------------
// Do the equivalent using Cert.GetIssuer.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
CkCertW issuerCert;
bool success = cert.GetIssuer(issuerCert);
if (success == false) {
wprintf(L"%s\n",email.lastErrorText());
return;
}
}
|