Compartilhar via


IRTCUserSearch::ExecuteSearch (Windows CE 5.0)

Send Feedback

This method executes a search using a user search query object. Search results are in the form of an RTCE_USERSEARCH event, returned asynchronously via the IRTCUserSearchResultsEvent interface.

HRESULT ExecuteSearch(  IRTCUserSearchQuery* pQuery,  IRTCProfile* pProfile,  LONG_PTR lCookie);

Parameters

  • pQuery
    [in] Pointer to the IRTCUserSearchQuery interface on a user search query object created with IRTCUserSearch::CreateQuery.
  • pProfile
    [in] Pointer to the IRTCProfile interface that is to be used to request the search. The search request is sent to the registrar server specified in the profile. If the server challenges the request, the user name and password specified in the profile are used to authenticate the user; the profile does not need to be enabled. If this parameter is NULL, the RTC Client API attempts to find a suitable profile from the list of enabled profiles.
  • lCookie
    [in] Pointer to an application-specified cookie that identifies this request. This value is generated and maintained by the application. It is also used to synchronize search requests and results indicated by an RTCE_USERSEARCH event. The application is responsible for ensuring the uniqueness of the cookie, as well as for releasing the cookie values from completed searches.

Return Values

This method can return an RTC_E_ constant. The following table shows additional return values and additional information about specific return values.

Value Meaning
E_OUTOFMEMORY Insufficient memory to perform this operation.
E_POINTER The pProfile or pQuery parameter is not a valid pointer.
RTC_E_NO_PROFILE The pProfile parameter is NULL and the RTC Client API is unable to find a suitable profile for the search.
RTC_E_UDP_NOT_SUPPORTED The current profile specifies the UDP transport for the registrar server; subsequently, the user search is not allowed when the UDP transport is specified in the registrar server.

Remarks

To execute a search, a profile that has PC-to-PC capabilities specified in the session type settings must be currently enabled. A profile can be created with the IRTCClientProvisioning::GetProfile method. It can then be enabled using the IRTCClientProvisioning::EnableProfile method.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCUserSearch | IRTCClientProvisioning::GetProfile | IRTCClientProvisioning::EnableProfile | IRTCProfile | IRTCUserSearch::CreateQuery | IRTCUserSearchQuery | RTCUserSearchResultsEvent

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.