# cnfSetCoaching

Specifies the conference members who can and cannot hear member memberid.

#### Prototype

DWORD cnfSetCoaching ( CNFRESOURCEHD cnfresourcehd, DWORD memberid, BYTE flag, DWORD *listeneridlist, unsigned numlistenerids)

Argument | Description
cnfresourcehd | Resource handle returned by cnfOpenResource.
memberid | Member identifier returned by cnfJoinConference.
flag | Value of either CNF_COACHING_HEAR or CNF_COACHING_SILENT.
listeneridlist | Depending on the flag, points to a list of members who can hear memberid (CNF_COACHING_HEAR) or to a list of members who cannot hear memberid (CNF_COACHING_SILENT).
numlistenerids | Number of entries in listeneridlist.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BOARD_ERROR |
CTAERR_INVALID_HANDLE | cnfresourcehd is not a valid conference handle.
CNFERR_CAPABILITY_NOT_AVAILABLE | The conference does not have coaching capabilities.
CNFERR_INVALID_IDENTIFIER | memberid or one of the memberid in the list is not a valid member identifier or does not belong to the same conference.

#### Details

Use cnfSetCoaching to specify the members who can and cannot hear (depending on the flag) the member for which this function was called. This feature is typically used to enable a coach to listen to a conference and provide input to one or more colleagues without the knowledge of other conference members.

Note: When calling cnfSetCoaching, the flag for each member not listed in the listeneridlist array is set to the opposite of the value of flag (CNF_COACHING_SILENT / CNF_COACHING_HEAR) passed to cnfSetCoaching . This is particularly important to be aware of when calling cnfSetCoaching for newly added members where previous coaching relationships have already been defined.

If the flag is... | Then...
--- | ---
CNF_COACHING_HEAR | Members in the list can hear memberid.
CNF_COACHING_SILENT | Members in the list cannot hear memberid. Members not in the list hear memberid by default. If members are using a specific member attribute or calling this function, they can hear the other members.

#### See also

cnfGetCoaching

#### Example

// Create a sub conference between 2 members
void createSubConference(CNFRESOURCEHD cnfresourcehd, DWORD member1, DWORD member2)
{
DWORD error;
// Only member2 hears member1
error = cnfSetCoaching(cnfresourcehd, member1, CNF_COACHING_HEAR , &member2, 1);
if (error != SUCCESS)
{
printf("Error %d when setting coaching on member %d", error , member1);
}
// Only member1 hears member2
error = cnfSetCoaching(cnfresourcehd, member2, CNF_COACHING_HEAR , &member1, 1);
if (error != SUCCESS)
{
printf("Error %d when setting coaching on member %d", error , member2);
}
}