DirectX SDK

IDirectPlay4::CancelPriority

The IDirectPlay4::CancelPriority method is used to cancel all messages of a particular priority or range of priorities that are still in the send queue. CancelPriority applies only to asynchronous messages.

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

Canceling a message still generates a DPMSG_SENDCOMPLETE system message indicating the message was canceled.

HRESULT CancelPriority(
  DWORD dwMinPriority,
  DWORD dwMaxPriority,
  DWORD dwFlags
);

Parameters

dwMinPriority
The minimum priority in the range to be canceled.
dwMaxPriority
The maximum priority in the range to be canceled. Must be greater than dwMinPriority. Set to MAXPRIORITY for the maximum possible priority.
dwFlags
This parameter is reserved. Must be 0.

Return Values

Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_INVALIDFLAGS
DPERR_INVALIDPARAMS
DPERR_UNSUPPORTED

This method returns DP_OK if there are no messages in the send queue.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dplay.h.
  Import Library: Use dplayx.lib.

See Also

IDirectPlay4::SendEx, IDirectPlay4::Send, IDirectPlay4::GetMessageQueue, DPMSG_SENDCOMPLETE, IDirectPlay4::CancelMessage