Platform SDK: DirectX |
The DirectPlay4.GetMessageQueue method retrieves information about the send or receive queue for a local player. If there is more than one player in a session on a single machine, the data returned is valid for all those players combined.
object.GetMessageQueue(from As Long, _ to As Long, _ flags As CONST_DPMESSAGEQUEUEFLAGS, _ nMessage As Long, _ nBytes As Long)
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DPERR_INVALIDFLAGS |
DPERR_INVALIDPARAMS |
DPERR_INVALIDPLAYER |
DPERR_UNSUPPORTED |
The method returns DPERR_INVALIDPLAYER if you check the receive queue (DPMESSAGEQUEUE_RECEIVE) while specifying to for a remote player. It returns DPERR_INVALIDPLAYER if you check the send queue (DPMESSAGEQUEUE_SEND) while specifying from for a remote player. It returns DPERR_INVALIDFLAGS if flags is DPMESSAGEQUEUE_RECEIVE Or DPMESSAGEQUEUE_SEND. It returns DPERR_UNSUPPORTED if you attempt to check the send queue when DirectPlay protocol is not turned on and the service provider does not support checking the send queue.
By monitoring the status of the send queue, an application can regulate how many messages to send to other players in the session based on the bandwidth of the underlying network.