EnumConnectionsCallback

Application-defined callback function for the IDirectPlay3::EnumConnections method.

BOOL FAR PASCAL EnumConnectionsCallback(
LPCGUID lpguidSP,
LPVOID lpConnection,
DWORD dwConnectionSize,
LPCDPNAME lpName,
DWORD dwFlags,
LPVOID lpContext
);

Parameters

lpguidSP

The GUID of the DirectPlay service provider or lobby provider associated with the connection. Use this GUID to uniquely identify the service or lobby provider, rather than using the order in the enumeration or the name.

lpConnection

A read-only pointer to a buffer that contains the connection. This parameter is passed to the IDirectPlay3::InitializeConnection method to initialize the DirectPlay object. This buffer contains a DirectPlay Address.

dwConnectionSize

The size, in bytes, of the lpConnection buffer.

lpName

A read-only pointer to a DPNAME structure. The structure contains the short name of the connection that should appear to the user.

If IDirectPlay3::EnumConnections was called on an ANSI interface, reference the strings as ANSI. If EnumConnections was called on a Unicode interface, reference the strings as Unicode.

dwFlags

Flags to indicate the type of connection. Not used at this time.

lpContext

Pointer to an application-defined context.

Return Values

Returns TRUE to continue the enumeration or FALSE to stop it.

Remarks

The application must implement this function in order to use the IDirectPlay3::EnumConnections method. It is called once for each connection that is enumerated.

The application should allocate memory and copy each of the connections for presentation to the user and for use in the IDirectPlay3::InitializeConnection method.

See Also

IDirectPlay3::EnumConnections, IDirectPlay3::InitializeConnection, Using DirectPlay Addresses