typedef struct {
DWORD dwSize;
DWORD dwFlags;
GUID guidInstance;
GUID guidApplication;
DWORD dwMaxPlayers;
DWORD dwCurrentPlayers;
union {
LPWSTR lpszSessionName;
LPSTR lpszSessionNameA;
};
union {
LPWSTR lpszPassword;
LPSTR lpszPasswordA;
};
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwUser1;
DWORD dwUser2;
DWORD dwUser3;
DWORD dwUser4;
} DPSESSIONDESC2, FAR *LPDPSESSIONDESC2;
Contains a description of an IDirectPlay2 session's capabilities. (The DPSESSIONDESC structure is no longer used in the IDirectPlay2 interface.)
Size of this structure, in bytes. Your application must set this member before it uses this structure; otherwise, an error will result.
A combination of the following flags.
No new applications can join this session. Any call to the IDirectPlay2::Open method with the DPOPEN_JOIN flag and the globally unique identifier (GUID) of this session instance will cause an error. If this flag is not specified, new remote applications can join the session until the session player limit is reached.
Automatically detect when remote players drop out of the game abnormally. Those players will be deleted from the session. If a temporary network outage caused the loss of the players, they will be informed when they return that they were dropped from the session. For more information, see the description for the DPSYS_SESSIONLOST system message in Using System Messages . If this flag is not specified, DirectPlay will not support this feature.
If the current host exits, the host will attempt to migrate to another computer so that new players can continue to join. If this flag is not specified, the host will not migrate and new players cannot be created.
Indicates that new players cannot be created in the session. Any call to the IDirectPlay2::CreatePlayer method by an application in the session will result in an error. Also, new applications cannot join the session. If this flag is not specified, players can be created until the session player limit is reached.
Do not send system messages when remote player or group data changes, by using the IDirectPlay2::SetPlayerData, IDirectPlay2::SetGroupData, IDirectPlay2::SetPlayerName, or IDirectPlay2::SetGroupName method. If this flag is not specified, messages will be generated indicating that the data changed.
Do not attach data to messages indicating who the message is from and who it is to. Saves message overhead if this information is not relevant. (For more information, see the IDirectPlay2::Receive method.) If this flag is not specified, the message ID will be added.
GUID of the session instance.
GUID for the application running in the session instance. It uniquely identifies the application so that DirectPlay connects only to other computers running the same application. This member can be set to GUID_NULL to enumerate sessions for any application.
Maximum number of players allowed in this session.
Number of players currently in the session.
lpszSessionName and lpszPassword
Addresses of Unicode strings containing the name and password of the session. Use these members only if the IDirectPlay2 interface is in use.
lpszSessionNameA and lpszPasswordA
Addresses of ANSI strings containing the session's name and password. Use these members only if the IDirectPlay2A interface is in use.
Reserved for future use.
dwUser1, dwUser2, dwUser3, and dwUser4
Application-specific data for the session.