Platform SDK: DirectX

EnumConnectionsCallback

EnumConnectionsCallback is an application-defined callback function for the IDirectPlay4::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 IDirectPlay4::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 IDirectPlay4::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. Equivalent to the dwFlags passed to EnumConnections.
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 IDirectPlay4::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 IDirectPlay4::InitializeConnection method.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dplay.h.

See Also

IDirectPlay4::EnumConnections, IDirectPlay4::InitializeConnection