Visual FoxPro Requires Chilkat v11.0.0+
Visual FoxPro
Transition from Cert.ExportPublicKey to Cert.GetPublicKey
Provides instructions for replacing deprecated ExportPublicKey method calls with GetPublicKey.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loCert
LOCAL loPublickeyObj
LOCAL loPublickeyOut
lnSuccess = 0
loCert = CreateObject('Chilkat.Cert')
* ------------------------------------------------------------------------
* The ExportPublicKey method is deprecated:
loPublickeyObj = loCert.ExportPublicKey()
IF (loCert.LastMethodSuccess = 0) THEN
? loCert.LastErrorText
RELEASE loCert
CANCEL
ENDIF
* ...
* ...
RELEASE loPublickeyObj
* ------------------------------------------------------------------------
* Do the equivalent using GetPublicKey.
* Your application creates a new, empty PublicKey object which is passed
* in the last argument and filled upon success.
loPublickeyOut = CreateObject('Chilkat.PublicKey')
lnSuccess = loCert.GetPublicKey(loPublickeyOut)
IF (lnSuccess = 0) THEN
? loCert.LastErrorText
RELEASE loCert
RELEASE loPublickeyOut
CANCEL
ENDIF
RELEASE loCert
RELEASE loPublickeyOut