DataFlex
DataFlex
Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoMailman
String sFilePath
Variant vBundleObj
Handle hoBundleObj
Handle hoBundle
String sTemp1
Boolean bTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatMailMan)) To hoMailman
If (Not(IsComObjectCreated(hoMailman))) Begin
Send CreateComObject of hoMailman
End
// ...
// ...
Move "c:/example/emailBundle.xml" To sFilePath
// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:
Get ComLoadXmlFile Of hoMailman sFilePath To vBundleObj
If (IsComObject(vBundleObj)) Begin
Get Create (RefClass(cComChilkatEmailBundle)) To hoBundleObj
Set pvComObject Of hoBundleObj To vBundleObj
End
Get ComLastMethodSuccess Of hoMailman To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoMailman To sTemp1
Showln sTemp1
Procedure_Return
End
// ...
// ...
Send Destroy of hoBundleObj
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXml.
Get Create (RefClass(cComChilkatEmailBundle)) To hoBundle
If (Not(IsComObjectCreated(hoBundle))) Begin
Send CreateComObject of hoBundle
End
Get ComLoadXml Of hoBundle sFilePath To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoBundle To sTemp1
Showln sTemp1
Procedure_Return
End
End_Procedure