DataFlex
DataFlex
Transition from Imap.GetAllUids to Imap.QueryMbx
Provides instructions for replacing deprecated GetAllUids method calls with QueryMbx.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoImap
Variant vMsgSetObj
Handle hoMsgSetObj
Variant vMset
Handle hoMset
String sTemp1
Boolean bTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatImap)) To hoImap
If (Not(IsComObjectCreated(hoImap))) Begin
Send CreateComObject of hoImap
End
// ...
// ...
// ------------------------------------------------------------------------
// The GetAllUids method is deprecated:
Get ComGetAllUids Of hoImap To vMsgSetObj
If (IsComObject(vMsgSetObj)) Begin
Get Create (RefClass(cComChilkatMessageSet)) To hoMsgSetObj
Set pvComObject Of hoMsgSetObj To vMsgSetObj
End
Get ComLastMethodSuccess Of hoImap To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoImap To sTemp1
Showln sTemp1
Procedure_Return
End
// ...
// ...
Send Destroy of hoMsgSetObj
// ------------------------------------------------------------------------
// Do the equivalent using QueryMbx.
// Your application creates a new, empty MessageSet object which is passed
// in the last argument and filled upon success.
Get Create (RefClass(cComChilkatMessageSet)) To hoMset
If (Not(IsComObjectCreated(hoMset))) Begin
Send CreateComObject of hoMset
End
Get pvComObject of hoMset to vMset
Get ComQueryMbx Of hoImap "ALL" True vMset To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoImap To sTemp1
Showln sTemp1
Procedure_Return
End
End_Procedure