Sample code for 30+ languages & platforms
Visual FoxPro

Transition from Email.GetSignedByCert to Email.LastSignerCert

Provides instructions for replacing deprecated GetSignedByCert method calls with LastSignerCert.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loEmail
LOCAL loCertObj
LOCAL loCertOut

lnSuccess = 0

loEmail = CreateObject('Chilkat.Email')

* ...
* ...

* ------------------------------------------------------------------------
* The GetSignedByCert method is deprecated:

loCertObj = loEmail.GetSignedByCert()
IF (loEmail.LastMethodSuccess = 0) THEN
    ? loEmail.LastErrorText
    RELEASE loEmail
    CANCEL
ENDIF

* ...
* ...

RELEASE loCertObj

* ------------------------------------------------------------------------
* Do the equivalent using LastSignerCert.
* Your application creates a new, empty Cert object which is passed 
* in the last argument and filled upon success.

loCertOut = CreateObject('Chilkat.Cert')
lnSuccess = loEmail.LastSignerCert(0,loCertOut)
IF (lnSuccess = 0) THEN
    ? loEmail.LastErrorText
    RELEASE loEmail
    RELEASE loCertOut
    CANCEL
ENDIF

RELEASE loEmail
RELEASE loCertOut