DataFlex
DataFlex
Transition from Email.CreateReply to Email.ToReply
Provides instructions for replacing deprecated CreateReply method calls with ToReply.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoEmail
Variant vEmailObj
Handle hoEmailObj
Variant vEmailOut
Handle hoEmailOut
String sTemp1
Boolean bTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatEmail)) To hoEmail
If (Not(IsComObjectCreated(hoEmail))) Begin
Send CreateComObject of hoEmail
End
// ...
// ...
// ------------------------------------------------------------------------
// The CreateReply method is deprecated:
Get ComCreateReply Of hoEmail To vEmailObj
If (IsComObject(vEmailObj)) Begin
Get Create (RefClass(cComChilkatEmail)) To hoEmailObj
Set pvComObject Of hoEmailObj To vEmailObj
End
Get ComLastMethodSuccess Of hoEmail To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoEmail To sTemp1
Showln sTemp1
Procedure_Return
End
// ...
// ...
Send Destroy of hoEmailObj
// ------------------------------------------------------------------------
// Do the equivalent using ToReply.
// Your application creates a new, empty Email object which is passed
// in the last argument and filled upon success.
Get Create (RefClass(cComChilkatEmail)) To hoEmailOut
If (Not(IsComObjectCreated(hoEmailOut))) Begin
Send CreateComObject of hoEmailOut
End
Get pvComObject of hoEmailOut to vEmailOut
Get ComToReply Of hoEmail vEmailOut To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoEmail To sTemp1
Showln sTemp1
Procedure_Return
End
End_Procedure