Microsoft DirectX 8.1 (Visual Basic) |
Transmits data to the specified player. The message can be sent synchronously or asynchronously.
SendTo(idSend As Long, _ buffer() As BYTE, _ lPriority As Long, _ lTimeOut As Long, _ lFlags As CONST_DPNSENDFLAGS) As Long
Returns the asynchronous handle for this operation. This is the handle that is used in lAsyncHandle parameter of the DirectPlay8Server.CancelAsyncOperation method to cancel the request, if the request is processed asynchronously.
If the method fails, Err.Number can be set to one of the following values.
DPNERR_INVALIDFLAGS |
DPNERR_TIMEDOUT |
This method will call the DirectPlay8Event.Receive method in the recipient's message handler. When the SendTo request is completed, the DirectPlay8Event.SendComplete method is called in the sender's message handler. The SendComplete method contains a DPNMSG_SEND_COMPLETE message type. The success or failure of the request is contained in the hResultCode member of this message type.