Index Topic Contents | |||
Previous Topic: DPSECURITYDESC Next Topic: System Messages |
DPSESSIONDESC2
Contains a description of an IDirectPlay3 Interface session's capabilities. (The DPSESSIONDESC structure is no longer used in the IDirectPlay3 interface.)
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;Members
- dwSize
- The size of the DPSESSIONDESC2 structure, dwsize = sizeof(DPSESSIONDESC2). Your application must set this member before it uses this structure; otherwise, an error will result.
- dwFlags
- A combination of the following flags. These flags can be changed after a session has started by using IDirectPlay3::SetSessionDesc.
- DPSESSION_CLIENTSERVER
- This is a client/server session that is being hosted by an application server process. This flag must be specified at the time the session is created. Any clients that join this session will only be able to enumerate the server player and any local players. The host of the session will see all the players. If this flag is not set, the session is a peer-to-peer session. If this flag is set, the host can only create a server player. This flag cannot be used with DPSESSION_MIGRATEHOST.
- DPSESSION_JOINDISABLED
- No new applications can join this session. Any call to the IDirectPlay3::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.
- DPSESSION_KEEPALIVE
- 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 through the DPMSG_SESSIONLOST system message. This flag must be specified at the time the session is created. If this flag is not specified, DirectPlay will not automatically keep the session alive if players are abnormally terminated.
- DPSESSION_MIGRATEHOST
- If the current host exits, another computer in the session will become the host. The players on the new host computer will receive a DPMSG_HOST system message. This flag must be specified at the time the session is created. If this flag is not specified, the host will not migrate, new computers cannot join the session, and new players cannot be created if the current host leaves. Note that the DPSESSION_MIGRATEHOST flag cannot be used with the DPSESSION_CLIENTSERVER, DPSESSION_MULTICASTSERVER, or DPSESSION_SECURESERVER flags.
- DPSESSION_MULTICASTSERVER
- In a peer-to-peer session, broadcast and group messages are routed through the host which acts like a multicast server. This flag must be specified at the time the session is created. The flag is only useful if the host has a high bandwidth connection to the network. If this flag is not specified, broadcast and group messages are sent directly between peers. This flag cannot be used with DPSESSION_MIGRATEHOST.
- DPSESSION_NEWPLAYERSDISABLED
- Indicates that new players cannot be created in the session. Any call to the IDirectPlay3::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.
- DPSESSION_NODATAMESSAGES
- Do not send system messages when remote player data, group data, or session data is changed with the IDirectPlay3::SetPlayerData, IDirectPlay3::SetGroupData, IDirectPlay3::SetPlayerName, IDirectPlay3::SetGroupName, or IDirectPlay3::SetSessionDesc method. If this flag is not specified, messages will be generated indicating that the data changed.
Note that setting this flag also suppresses the DPMSG_SETSESSIONDESC message.
- DPSESSION_NOMESSAGEID
- Do not attach data to messages indicating what player the message is from and to whom it is sent. Saves message overhead if this information is not relevant. (For more information, see the IDirectPlay3::Receive method.) If this flag is not specified, the message ID will be added. This flag must be specified at the time the session is created.
- DPSESSION_PASSWORDREQUIRED
- This session is password protected. Any applications wishing to join the session must supply the password in the IDirectPlay3::Open call. This is a read-only flag. It will be set automatically by DirectPlay when the host of the session specifies a non-NULL password.
- DPSESSION_PRIVATE
- This is a private session. It can not respond to enumeration requests unless the request contains a non-NULL, matching password. If this flag is not specified, the session will respond to enumeration requests.
- DPSESSION_SECURESERVER
- This session is being hosted on a secure server which will require authentication credentials before it can be opened. The host must specify this flag when the session is created. It cannot be changed later through IDirectPlay3::SetSessionDesc. This flag can only be used if the DPSESSION_CLIENTSERVER flag is also specified. This flag cannot be used with the DPSESSION_MIGRATEHOST flag.
- guidInstance
- GUID of the session instance.
- guidApplication
- 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.
- dwMaxPlayers
- Maximum number of players allowed in this session. A value of zero means there is no maximum.
- dwCurrentPlayers
- Number of players currently in the session.
- lpszSessionName
- Pointer to a Unicode string containing the name of the session. Use only if a Unicode DirectPlay interface (IDirectPlay3 Interface) is being used.
- lpszSessionNameA
- Pointer to an ANSI string containing the name of the session. Use only if an ANSI DirectPlay interface (IDirectPlay3A) is being used.
- lpszPassword
- Pointer to a Unicode string containing the password used to join the session for participation. Use only if a Unicode DirectPlay interface (IDirectPlay3 Interface) is being used.
- lpszPasswordA
- Pointer to an ANSI string containing the password used to join the session for participation. Use only if an ANSI DirectPlay interface (IDirectPlay3A) is being used.
- dwReserved1 and dwReserved2
- Must be zero.
- dwUser1, dwUser2, dwUser3, and dwUser4
- Application-specific data for the session.
See Also
IDirectPlay3::EnumSessions, IDirectPlay3::GetSessionDesc, IDirectPlay3::Open, IDirectPlay3::SecureOpen, IDirectPlay3::SetSessionDesc, IDirectPlay3::CreatePlayer, DPPLAYER_SERVERPLAYER
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.