Sample code for 30+ languages & platforms
AutoIt

Transition from Cert.ExportPublicKey to Cert.GetPublicKey

Provides instructions for replacing deprecated ExportPublicKey method calls with GetPublicKey.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oCert = ObjCreate("Chilkat.Cert")

; ------------------------------------------------------------------------
; The ExportPublicKey method is deprecated:

Local $oPublickeyObj = $oCert.ExportPublicKey()
If ($oCert.LastMethodSuccess = False) Then
    ConsoleWrite($oCert.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

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

$oPublickeyOut = ObjCreate("Chilkat.PublicKey")
$bSuccess = $oCert.GetPublicKey($oPublickeyOut)
If ($bSuccess = False) Then
    ConsoleWrite($oCert.LastErrorText & @CRLF)
    Exit
EndIf