DirectX SDK

IDirectPlay4::GetGroupName

The IDirectPlay4::GetGroupName method returns the name associated with a group.

HRESULT GetGroupName(
  DPID idGroup,
  LPVOID lpData,
  LPDWORD lpdwDataSize
);

Parameters

idGroup
ID of the group whose name is being requested.
lpData
Pointer to a buffer where the name data is to be written. Set this parameter to NULL to request only the size of data. lpdwDataSize will be set to the size required to hold the data.
lpdwDataSize
Pointer to a variable that is initialized to the size of the buffer before calling the method. After the method returns, this parameter will be set to the size, in bytes, of the name data. If the buffer was too small (DPERR_BUFFERTOOSMALL), then this parameter will be set to the buffer size that is required.

Return Values

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

DPERR_BUFFERTOOSMALL
DPERR_INVALIDGROUP
DPERR_INVALIDOBJECT
DPERR_INVALIDPARAMS
DPERR_INVALIDPLAYER

Remarks

After the method returns, the pointer lpData should be cast to the DPNAME structure to read the group name data.

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

DPNAME, IDirectPlay4::SetGroupName