Platform SDK: DirectX

DirectPlayMessage.ReadSysMsgData

The DirectPlayMessage.ReadSysMsgData method obtains data from a DPSYS_CREATEPLAYERORGROUP, DPSYS_DESTROYPLAYERORGROUP, or DPSYS_SETPLAYERORGROUPDATA message.

object.ReadSysMsgData() As String

Parameters

object
Object expression that resolves to a DirectPlayMessage object.

Return Values

The method returns a string containing the message data.

Error Codes

If the method fails, an error is raised and Err.Number will be set.

Remarks

The read pointer must be at the correct location within the message in order for this method to be called successfully. For example, when parsing a DPSYS_DESTROYPLAYERORGROUP message, you first have to call DirectPlayMessage.ReadLong three times in order to retrieve the message type, player type, and player ID. After ReadSysMsgData has been called, the read pointer advances to the next field described in the reference for the message type. (See CONST_DPSYSMSGTYPES.) In this respect the method differs from DirectPlayMessage.ReadSysChatString, DirectPlayMessage.ReadSysMsgConnection, and DirectPlayMessage.ReadSysMsgSessionDesc, which can retrieve data regardless of whether other parts of the message have been read, and which do not advance the read pointer.