Share via


IExchangeClient::RequestGALSearch (Windows Embedded CE 6.0)

1/6/2010

This method initiates a request to the Exchange server for information from the global address list (GAL).

Syntax

HRESULT RequestGALSearch(
  struct GALSearchCriteria* pCriteria,
  IExchangeClientRequest** ppiRequest
);

Parameters

  • pCriteria
    [in] Pointer to a GALSearchCriteria instance that constrains the search to specified GAL information.

    At least one field in the GALSearchCriteria instance must be specified.

  • ppiRequest
    [out, retval] Pointer to a caller-supplied variable that this method uses to return a reference to an IExchangeClientRequest instance that represents this request.

Return Value

The following table shows possible return values:

Value Description

E_POINTER

The address of pCriteria does not point to a structure.

E_OUTOFMEMORY

Not enough memory was available to initiate the request.

OWAEC_E_INVALIDSEARCH

All fields in the structure pointed to by pCriteria are NULL or are empty. At least one piece of criteria information must be specified.

OWAEC_E_NOTINITIALIZED

This instance of the Exchange client has not been initialized.

It must be initialized using the IExchangeClient::Initialize method.

S_OK

The request was submitted successfully.

Remarks

The results generated by this method contain the GAL results that meet the specified criteria. For more information about how the Exchange server responds to different criteria values, see GALSearchCriteria.

This method returns immediately.

When the IExchangeClientRequestCallback::OnRequestProgress method indicates that the request is complete by returning the e_ecrsSucceeded value, calling code can use the IExchangeClientRequest::GetDataItemArray method to retrieve the returned results.

Calling code can then call IExchangeClientDataItemArray::GetItemAt and then query the returned interface for the IExchangeClientGALSearchInformation interface.

Finally, calling code can use the methods in the IExchangeClientGALSearchInformation interface to retrieve GAL information.

For a list of steps necessary to retrieve information using this method, see Retrieving Information from an Exchange Server.

Requirements

Header iexchangeclient.h, iexchangeclient.idl
Library OWAExchangeClient.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IExchangeClient
ExchangeClientRequestStatus
GALSearchCriteria
IExchangeClientDataItemArray::GetItemAt
IExchangeClientGALSearchInformation
IExchangeClientRequest
IExchangeClientRequest::GetDataItemArray
IExchangeClientRequestCallback::OnRequestProgress