The DirectPlayMessage.WriteShort method writes an Integer to the message data and advances the write pointer.
object.WriteShort(val As Integer)
If the method fails, an error is raised and Err.Number will be set.