DirectX SDK

IDirectPlay4::SetGroupOwner

The IDirectPlay4::SetGroupOwner method changes the owner of a group. This method is only available in a lobby session. It generates a DPMSG_SETGROUPOWNER system message.

HRESULT SetGroupOwner(
  DPID idGroup,
  DPID idOwner
);

Parameters

idGroup
ID of the group whose owner is being changed.
idOwner
ID of the player to be set as the owner of the group.

Return Values

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

DPERR_CONNECTIONLOST
DPERR_GENERIC
DPERR_INVALIDGROUP
DPERR_INVALIDPLAYER
DPERR_UNAVAILABLE

This method returns DPERR_UNAVAILABLE if the session is not a lobby session.

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::GetGroupOwner, DPMSG_SETGROUPOWNER