IDirectPlayVoiceServer::SetTransmitTargets Method

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlayVoiceServer::SetTransmitTargets Method


Controls the transmission of audio from the client to the specified members of the session.

Syntax

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

Parameters

dvSource
[in] DVID of the user whose targets are set.
pdvIDTargets
[in]  Pointer to an array of DVIDs that specify your targets. To target all players in the session, use a single element array with the value of that element set to DVID_ALLPLAYERS. To target no players, set this parameter to NULL.
dwNumTargets
[in] Number of DVIDs in the array. This value cannot exceed 64. If pdvIDTargets is NULL, this must be 0.
dwFlags
[in] Reserved. Must be 0.

Return Value

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

DVERR_INVALIDFLAGSThe flags passed to this method are invalid.
DVERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DVERR_INVALIDPOINTERThe pointer specified is invalid.
DVERR_INVALIDTARGETThe specified target is not a valid player ID or group ID for this voice session.
DVERR_NOTALLOWEDThe object does not have the permission to perform this operation.
DVERR_NOTINITIALIZEDThe IDirectPlayVoiceClient::Initialize or IDirectPlayVoiceServer::Initialize method must be called before calling this method.

Remarks

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.

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.

This method can be used only if the DVSESSION_SERVERCONTROLTARGET flag is specified on creation of the DirectPlay Voice session. If the flag is not specified, this method returns DVERR_NOTALLOWED.



© 2003 Microsoft Corporation. All rights reserved.