Platform SDK: DirectX |
The DirectPlay4.SetSessionDesc method changes the properties of the current session. Only the host of the session can change the session properties.
This method cannot be used in a lobby session.
object.SetSessionDesc(sessionDesc As DirectPlaySessionData)
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DPERR_ACCESSDENIED |
DPERR_CONNECTIONLOST |
DPERR_INVALIDPARAMS |
DPERR_NOSESSIONS |
This method returns DPERR_ACCESSDENIED if this computer does not have permission to change the session. It returns DPERR_INVALIDPARAMS if the application attempts to change a property in the session description that cannot be changed or tries to give a property an invalid value.
The updated session description will be propagated to all the other computers in the session. Each player will receive a DPSYS_SETSESSIONDESC system message.
The following methods can be used to set elements of the session description that can be changed:
DPSESSION_JOINDISABLED
DPSESSION_NEWPLAYERSDISABLED
DPSESSION_NODATAMESSAGES
DPSESSION_PRIVATE
If you change other properties of the object by calling DirectPlaySessionData.SetGuidInstance or DirectPlaySessionData.SetGuidApplication, the new settings are ignored—that is, DirectPlay will always use the values set when DirectPlay4.Open was called.