(PowerShell) Transition from Email.GetLinkedDomains to Email.LinkedDomains
Provides instructions for replacing deprecated GetLinkedDomains method calls with LinkedDomains. Note: This example requires Chilkat v11.0.0 or greater.
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$email = New-Object Chilkat.Email
# ...
# ...
# ------------------------------------------------------------------------
# The GetLinkedDomains method is deprecated:
$sa = $email.GetLinkedDomains()
if ($email.LastMethodSuccess -eq $false) {
$($email.LastErrorText)
exit
}
# ...
# ...
# ------------------------------------------------------------------------
# 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 = New-Object Chilkat.StringTable
$success = $email.LinkedDomains($st)
if ($success -eq $false) {
$($email.LastErrorText)
exit
}
|