Application-defined callback function for the IDirectPlay3::EnumSessions method.
BOOL FAR PASCAL EnumSessionsCallback2(
LPCDPSESSIONDESC2 lpThisSD,
LPDWORD lpdwTimeOut,
DWORD dwFlags,
LPVOID lpContext
);
Returns TRUE to continue the enumeration or FALSE to stop it.
The application must implement this function in order to use the IDirectPlay3::EnumSessions method. This callback function will be called once for each session that is enumerated. Once all the session are enumerated, the callback function will be called one additional time with the DPESC_TIMEDOUT flag.
Applications should look at the flags of the DPSESSIONDESC2 to determine the nature of the session.
Any pointers returned in a callback function are temporary and are valid only in the body of the callback function. If the application needs to save pointer information, it must allocate memory to hold the data, copy the data, and then store the pointer to this new data. In this function, lpThisSD is temporary. Also note that the pointers inside the structure specified in the lpThisSD parameterlpszSessionName / lpszSessionNameA and lpszPassword / lpszPasswordAare also temporary.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.