Platform SDK: DirectX

DirectPlay4.CancelMessage

The DirectPlay4.CancelMessage method cancels a specific message, or all the messages, in the send queue. CancelMessage applies only to asynchronous messages. To cancel a specific message, the application must obtain and save the message ID returned by the DirectPlay4.SendEx method.

Messages that have left the message queue and are partially sent cannot be canceled. A message sent to a group cannot be canceled after it has been sent to at least one member of the group.

object.CancelMessage(msgid As Long) 

Parameters

object
Object expression that resolves to a DirectPlay4 object.
msgid
ID of the specific message to be canceled. This ID is returned when the message is sent using DirectPlay4.SendEx. Specify 0 to cancel all messages.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values:

DPERR_CANCELFAILED
DPERR_INVALIDFLAGS
DPERR_INVALIDPARAMS
DPERR_UNKNOWNMESSAGE
DPERR_UNSUPPORTED

See Also

DirectPlay4.CancelPriority, DirectPlay4.Send