Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Email.GetEncryptedByCert to Email.LastDecryptCert
Provides instructions for replacing deprecated GetEncryptedByCert method calls with LastDecryptCert.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oEmail
LOCAL oCertObj
LOCAL oCertOut
nSuccess := 0
oEmail := CreateObject("Chilkat.Email")
// ...
// ...
// ------------------------------------------------------------------------
// The GetEncryptedByCert method is deprecated:
oCertObj := oEmail:GetEncryptedByCert()
IF (oEmail:LastMethodSuccess == 0)
? oEmail:LastErrorText
oEmail:destroy()
RETURN
ENDIF
// ...
// ...
oCertObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using LastDecryptCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
oCertOut := CreateObject("Chilkat.Cert")
nSuccess := oEmail:LastDecryptCert(oCertOut)
IF (nSuccess == 0)
? oEmail:LastErrorText
oEmail:destroy()
oCertOut:destroy()
RETURN
ENDIF
oEmail:destroy()
oCertOut:destroy()