Interface IEnumSessionsCallback2
public interface IEnumSessionsCallback2 extends IUnknown
{
// Methods
public void callbackEnumSessions(DPSessionDesc sessionDesc, _Guid
instanceGuid, _Guid applicationGuid, String sessionName,
String password, int[] timeOut, int flags, IUnknown
context);
}
Use with DirectPlay2.enumSessions to set the callback function to be called for each active session.
You must use the DirectPlay2.stopEnumSessions to stop a session enumeration, or the enumeration will continue infinitely.
IUnknown
|
+--IEnumSessionsCallback2
public void callbackEnumSessions(DPSessionDesc sessionDesc,
_Guid instanceGuid, _Guid applicationGuid, String sessionName,
String password, int[] timeOut, int flags, IUnknown context);
Enumerates sessions. This is an application-defined callback procedure.
Return Value:
No return value.
Parameter | Description |
sessionDesc
| A DPSessionDesc object describing the enumerated session. This parameter will be set to null if the enumeration has timed out.
|
instanceGuid
| A globally unique identifier (GUID) of the session instance.
|
applicationGuid
| The GUID for the application running in the session instance. It uniquely identifies the application so that Microsoft® 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
| The Unicode string containing the name of the session. Use these members only if the IDirectPlay2 interface is in use.
|
password
| The Unicode string containing the password of the session. Use this member only if the IDirectPlay2 interface is in use.
|
timeOut
| The array variable that contains the current time-out value. This can be reset when the DPESC_TIMEDOUT flag is returned if you want to wait longer for sessions to reply.
|
flags
| Typically, this flag is set to zero.
- DPESC_TIMEDOUT
- The enumeration has timed out. Reset timeOut and return 1 to continue, or 0 to stop the enumeration.
|
context
| The caller-defined context.
|