PowerBuilder
PowerBuilder
Transition from Email.CreateReply to Email.ToReply
Provides instructions for replacing deprecated CreateReply method calls with ToReply.Chilkat PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_Email
oleobject loo_EmailObj
oleobject loo_EmailOut
li_Success = 0
loo_Email = create oleobject
li_rc = loo_Email.ConnectToNewObject("Chilkat.Email")
if li_rc < 0 then
destroy loo_Email
MessageBox("Error","Connecting to COM object failed")
return
end if
// ...
// ...
// ------------------------------------------------------------------------
// The CreateReply method is deprecated:
loo_EmailObj = loo_Email.CreateReply()
if loo_Email.LastMethodSuccess = 0 then
Write-Debug loo_Email.LastErrorText
destroy loo_Email
return
end if
// ...
// ...
destroy loo_EmailObj
// ------------------------------------------------------------------------
// Do the equivalent using ToReply.
// Your application creates a new, empty Email object which is passed
// in the last argument and filled upon success.
loo_EmailOut = create oleobject
li_rc = loo_EmailOut.ConnectToNewObject("Chilkat.Email")
li_Success = loo_Email.ToReply(loo_EmailOut)
if li_Success = 0 then
Write-Debug loo_Email.LastErrorText
destroy loo_Email
destroy loo_EmailOut
return
end if
destroy loo_Email
destroy loo_EmailOut