Platform SDK: DirectX |
The DirectPlayMessage.SetMessageData method writes data of a user-defined type to a message.
object.SetMessageData(userDefinedType As Any, size As Long)
If the method fails, an error is raised and Err.Number will be set.
SetMessageData can be used only to set the entire contents of a message. It must not be called more than once per message, nor can it be mixed with calls to other write methods. The data should be retrieved by using DirectPlayMessage.GetMessageData.
It is recommended that this method be employed by advanced users only. In most cases, it is better to construct message data by using the DirectPlayMessage.WriteX methods, then read back the data with the corresponding DirectPlayMessage.ReadX methods.