Microsoft DirectX 8.0 (C++)

IDirectPlayVoiceClient::SetTransmitTargets

Specifies which players and/or groups receive audio transmissions from the local client.

HRESULT SetTransmitTargets(
PDVID pdvIDTargets,
DWORD dwNumTargets,
DWORD dwFlags
);

Parameters

pdvIDTargets
Pointer an array of DVIDs that specify your targets. To specify no targets, pass NULL for this parameter. Additionally, this parameter can be set to the following value.
DVID_ALLPLAYERS
The client is targeting all players in the session. This must be the only element in the array.
dwNumTargets
Number of DVIDs in the array. This value cannot exceed 64. If pdvIDTargets is NULL, this must be 0.
dwFlags
Reserved. Must be 0.

Return Values

Returns DV_OK if successful, or one of the following error values.

DVERR_INVALIDFLAGS
DVERR_INVALIDPARAM
DVERR_INVALIDPOINTER
DVERR_INVALIDTARGET
DVERR_NOTINITIALIZED

Remarks

For Microsoft® DirectX® 8.0, the number of individual targets that you can transmit to is limited to 64. If you exceed this value, the method will fail, and return DVERR_NOTALLOWED. However, you can transmit to more than 64 players. To do so, form the players into groups, and then use the group as your target.

The pdvIDTargets parameter specifies an array of player and/or group DVIDs. There must be no duplicate targets in this parameter, and all entries must be valid DVIDs. If a target contains a player as its individual DVID and through a group that the target belongs to, Microsoft® DirectPlay® Voice ensures duplicate speech packets are not sent to the player.

If the session was created with the DVSESSION_SERVERCONTROLTARGET flag, only the server can set the targets for this local client. A call to this method returns DVERR_NOTALLOWED.

Requirements

  Windows NT/2000: Available as a redistributable for Windows 2000 and later.
  Windows 95/98: Available as a redistributable for Windows 95 and later.
  Header: Declared in Dvoice.h.