Microsoft DirectX 8.1 (Visual Basic)

Implementing a DirectPlay Enumeration

Most DirectPlay enumerations follow a standard pattern: determine how many items are to be enumerated and call the appropriate enumeration method. The exception to this pattern is host enumerations, which are discussed separately.

The following procedure outlines how to enumerate the members of a group in a peer-to-peer game. The same general procedure is followed by all other types of enumeration, except for host enumerations.

  1. Call DirectPlay8Peer.GetCountGroupMembers. This method returns the number of members in the group.
    1. Call DirectPlay8Peer.GetGroupMember once for each member in the group. The method returns the ID of the specified player.

For more information, see Enumerating Hosts.