## What's New in DirectPlay 5?

This section discusses new features in DirectPlay® 5. For the most recent updates, including new features, additional samples, and further technical information, consult the Microsoft® DirectX® Web site at http://www.microsoft.com/DirectX/.

DirectPlay 5 has a new interface, IDirectPlay3. This interface inherits directly from IDirectPlay2 and by default behaves as IDirectPlay2. All new functionality is enabled through new methods or flags.

DirectPlay 5 supports the following new features and methods:

- DirectPlay interface objects can be created directly by using the CoCreateInstance method. This eliminates the need to link directly to the Dplayx.dll dynamic-link library.
- IDirectPlay3::EnumConnections enumerates the service providers and lobby providers available to the application. This method supersedes DirectPlayEnumerate.
- IDirectPlay3::InitializeConnection initializes a DirectPlay connection. This method supersedes DirectPlayCreate.
- The new IDirectPlayLobby2::CreateCompoundAddress method creates an address to pass to the InitializeConnection method.
- IDirectPlay3::SecureOpen creates or joins a session on a server that requires security.
- IDirectPlay3::CreateGroupInGroup, IDirectPlay3::AddGroupToGroup, IDirectPlay3::DeleteGroupFromGroup, and IDirectPlay3::EnumGroupsInGroup add richer group functionality and navigation. The new IDirectPlay3::GetGroupFlags and IDirectPlay3::GetGroupParent methods give ready access to additional group information.
- IDirectPlay3::SendChatMessage enables players to chat with other players in a session or connected to a lobby server, using standardized messages.
- IDirectPlay3::SetGroupConnectionSettings, IDirectPlay3::GetGroupConnectionSettings, and IDirectPlay3::StartSession enable synchronized application launching from a lobby server.
- The new DPCREDENTIALS structure holds the user name, password, and domain to use when connecting to a secure server. The DPSECURITYDESC structure describes the security properties of a DirectPlay session instance.
- The new DPCOMPOUNDADDRESSELEMENT structure describes a DirectPlay Address (Optional) data chunk that can be used to create longer DirectPlay Addresses.
- A session host can use the new IDirectPlay3::GetPlayerAccount method and new DPACCOUNTDESC structure to obtain account information for a player logged into a secure session.
- The new IDirectPlay3::GetPlayerFlags method gives access to a player's flag settings.

DirectPlay 5 also supports new functionality for existing DirectPlay 3 methods:

- An application can create multiple DirectPlay objects.
- The IDirectPlay3::SetSessionDesc method enables the host to change the session description.
- The IDirectPlay3::EnumSessions method can now be called asynchronously and will maintain a constantly refreshing list of sessions available on the session.
- Password protection of sessions has been improved. Specify the DPENUMSESSIONS_PASSWORDREQUIRED flag in EnumSessions to enumerate password-protected sessions (in addition to nonpassword-protected sessions). The DPSESSIONDESC2 structure will contain a flag indicating that the session needs a password. Put the password in the DPSESSIONDESC2 structure passed to the Open method to join the session.
- Applications can override the service provider dialog boxes that prompt users for information. To prevent these dialog boxes from appearing, create a DirectPlay Address (Optional) by using the IDirectPlayLobby2::CreateAddress or IDirectPlayLobby2::CreateCompoundAddress methods and then call IDirectPlay3::InitializeConnection with this DirectPlay Address. A subsequent call to IDirectPlay3::EnumSessions will not display a dialog box prompting the user for address information.
- A new multicast server option improves group messaging.
- Support has been added for scalable client/server architecture applications.
- Sessions can be hosted securely and require users to log in with a name and password.
- Members of a secure session can send digitally signed or encrypted messages, by using the DPSEND_SIGNED and DPSEND_ENCRYPTED flags in the Send method.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.