Microsoft DirectX 8.1 (Visual Basic)

Using the DirectX Protocol in an Application

This section covers how you can use the features of the Microsoft® DirectPlay® protocol in your application.

You can use five DirectPlay objects to send messages.

Depending on which object your application is using to send messages, you send a message by calling a method named either Send, or SendTo. While the usage of these five methods is similar, they vary in detail. Refer to the appropriate reference pages for further discussion.

The Send/Sendto method's parameters might allow you to control many of the DirectPlay protocol's features. For example, the lFlags field of DirectPlay8Peer.SendTo allows you to specify:

Refer to the appropriate method reference for further details.

When your application receives a message, DirectPlay will call your message handler's DirectPlay8Event.Receive method. The associated type contains a pointer to the data block, along with information such as the source of the message.