Platform SDK: DirectX

IDirectPlay4::GetGroupData

The IDirectPlay4::GetGroupData method retrieves an application-specific data block that was associated with a group ID by using IDirectPlay4::SetGroupData.

HRESULT GetGroupData(
  DPID idGroup,
  LPVOID lpData,
  LPDWORD lpdwDataSize,
  DWORD dwFlags
);

Parameters

idGroup
Group ID for which data is being requested.
lpData
Pointer to a buffer where the application-specific group data is to be written. Set this parameter to NULL to request only the size of data. The lpdwDataSize parameter 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 group data. If the buffer was too small (DPERR_BUFFERTOOSMALL), then this parameter will be set to the buffer size required.
dwFlags
If this parameter is set to 0, the remote data will be retrieved.
DPGET_LOCAL
Retrieves the local data set by this application
DPGET_REMOTE
Retrieves the current data from the remote shared data space.

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

DirectPlay can maintain two types of group data: local and remote. The application must specify which type of data to retrieve. Local data was set by this DirectPlay object by using the DPSET_LOCAL flag. Remote data might have been set by any application in the session by using the DPSET_REMOTE flag.

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::SetGroupData