Sample code for 30+ languages & platforms
Visual Basic 6.0

Transition from Imap.GetSslServerCert to Imap.GetServerCert

Provides instructions for replacing deprecated GetSslServerCert method calls with GetServerCert.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim imap As New ChilkatImap

' ...
' ...

' ------------------------------------------------------------------------
' The GetSslServerCert method is deprecated:

Dim certObj As ChilkatCert
Set certObj = imap.GetSslServerCert()
If (imap.LastMethodSuccess = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If

' ...
' ...

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

Dim cert As New ChilkatCert
success = imap.GetServerCert(cert)
If (success = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If