ExchangeMessageWriter.CancelWrite
Syntax:
Description:
If writing has started and has not been completed in some manner before deleting the ExchangeMessageWriter object, the CancelWrite method is implicitly called before deletion. Similarly, if message writing has not been completed and the BeginWrite method has been called, the previous message write function is interrupted.
Availability:
Example:
RecordOfMessage = ExchangePlans.CreateMessageWriter(); XMLWriter = New XMLWriter; XMLWriter.OpenFile(FileName); RecordOfMessage.BeginWrite(XMLWriter, Recipient); // Actions to write message body If Failure Then RecordOfMessage.CancelWrite(); Else RecordOfMessage.EndWrite(); EndIf; |