DirectX SDK

DirectPlayEnumerate

The DirectPlayEnumerate function enumerates the DirectPlay service providers installed on the system.

This function is obsolete and remains for compatibility with applications written using DirectX 3. It will only enumerate service providers, not DirectPlay addresses (connections). It is recommended that applications use the IDirectPlay4::EnumConnections method to enumerate all the connections available to the application after creating an IDirectPlay4 interface.

This function will not enumerate service providers that have the Enumerate value in the registry set to 0. For backward compatibility, this function will only return simple service providers registered under the "Service Providers" registry key.

HRESULT WINAPI DirectPlayEnumerate(
  LPDPENUMDPCALLBACK lpEnumCallback,
  LPVOID lpContext
);

Parameters

lpEnumCallback
Pointer to a callback function that will be called with a description of each DirectPlay service provider installed in the system. Depending on whether UNICODE is defined or not, the prototype for the callback function will have the service provider name lpSPName defined as a LPWSTR (for Unicode) or LPSTR (for ANSI).
lpContext
Pointer to an application-defined structure that will be passed to the callback function each time the function is called.

Return Values

Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_EXCEPTION
DPERR_GENERIC
DPERR_INVALIDPARAMS

DPERR_INVALIDPARAMS is returned if an invalid enumeration callback was supplied.

Remarks

This function will enumerate service providers installed in the system even though the system might not be capable of using those service providers. For example, a TAPI service provider will be part of the enumeration even though the system might not have a modem installed.

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.
  Import Library: Use dplayx.lib.

See Also

IDirectPlay4::EnumConnections, DirectPlayCreate