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