This method of the DirectPlay2 Class establishes a gaming session instance.
public void open(DPSessionDesc sessionDesc, _Guid sessionGuid, _Guid applicationGuid, String sessionName, String password, int flags);
sessionDesc | The DPSessionDesc object describing the session to be created or joined. |
sessionGuid | The GUID of the DirectPlay session of interest. |
applicationGuid | The GUID of 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. |
sessionName | Unicode string containing the name of the session. Use this member only if the IdirectPlay2 interface is in use. |
password | Unicode string containing the password of the session. Use this member only if the IDirectPlay2 interface is in use. |
flags | Can be one of the following flags: |
An application can either create a new session (which other remote applications join) or join an existing session. open must be called before any local players are created. Before an application can join an existing session, it will use enumSessions to obtain a list of what sessions can be joined and their session descriptions. Attempting to join a session where adding new players is disabled, joining is disabled, or the player limit has been reached will result in no action.