The put_SearchPreference method sets preferences to be applied when IRTCUserSearch::ExecuteSearch is called with the associated query object. This method sets the search preference returned in IRTCUserSearchQuery::get_SearchPreference.

HRESULT put_SearchPreference(RTC_USER_SEARCH_PREFERENCEenPreference,


  • enPreference
    [in] RTC_USER_SEARCH_PREFERENCE enumeration value indicating the preference to be set.
  • lValue
    [in] Integer value that contains the numeric value to be set for the preference. For example, if enPreference is set to RTCUSP_TIME_LIMIT, the associated time limit value can be set to 30 seconds by specifying a value of 30 in this parameter.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
E_INVALIDARG The enPreference parameter is not a valid enumeration value, or the lValue parameter is larger than the allowed limit.


Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Server 2003.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCUserSearchQuery is defined as 288300F5-D23A-4365-9A73-9985C98C2881.

See Also

IRTCUserSearchQuery, IRTCUserSearchQuery::get_SearchPreference, Create and Send a Search Request