Sample code for 30+ languages & platforms
Visual FoxPro Requires Chilkat v11.0.0+

Transition from Imap.GetSslServerCert to Imap.GetServerCert

Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loImap
LOCAL loCertObj
LOCAL loCert

lnSuccess = 0

loImap = CreateObject('Chilkat.Imap')

*  ...
*  ...

*  ------------------------------------------------------------------------
*  The GetSslServerCert method is deprecated:

loCertObj = loImap.GetSslServerCert()
IF (loImap.LastMethodSuccess = 0) THEN
    ? loImap.LastErrorText
    RELEASE loImap
    CANCEL
ENDIF

*  ...
*  ...

RELEASE loCertObj

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

loCert = CreateObject('Chilkat.Cert')
lnSuccess = loImap.GetServerCert(loCert)
IF (lnSuccess = 0) THEN
    ? loImap.LastErrorText
    RELEASE loImap
    RELEASE loCert
    CANCEL
ENDIF

RELEASE loImap
RELEASE loCert