PureBasic
PureBasic
Transition from Email.GetLinkedDomains to Email.LinkedDomains
Provides instructions for replacing deprecated GetLinkedDomains method calls with LinkedDomains.Chilkat PureBasic Downloads
IncludeFile "CkStringTable.pb"
IncludeFile "CkEmail.pb"
IncludeFile "CkStringArray.pb"
Procedure ChilkatExample()
success.i = 0
email.i = CkEmail::ckCreate()
If email.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; The GetLinkedDomains method is deprecated:
sa.i = CkEmail::ckGetLinkedDomains(email)
If CkEmail::ckLastMethodSuccess(email) = 0
Debug CkEmail::ckLastErrorText(email)
CkEmail::ckDispose(email)
ProcedureReturn
EndIf
; ...
; ...
CkStringArray::ckDispose(sa)
; ------------------------------------------------------------------------
; Do the equivalent using LinkedDomains.
; Your application creates a new, empty StringTable object which is passed
; in the last argument and filled upon success.
st.i = CkStringTable::ckCreate()
If st.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success = CkEmail::ckLinkedDomains(email,st)
If success = 0
Debug CkEmail::ckLastErrorText(email)
CkEmail::ckDispose(email)
CkStringTable::ckDispose(st)
ProcedureReturn
EndIf
CkEmail::ckDispose(email)
CkStringTable::ckDispose(st)
ProcedureReturn
EndProcedure