IAddrBook::SetSearchPath

The IAddrBook::SetSearchPath method sets a new search path in the profile that is used for the name resolution process.

Quick Info

See IAddrBook : IMAPIProp.

HRESULT SetSearchPath(
  ULONG ulFlags,          
  LPSRowSet lpSearchPath  
);
 

Parameters

ulFlags
Reserved; must be zero.
lpSearchPath
[in] Pointer to the SRowSet structure used to hold the search path. The first property for each aRow member in the SRowSet must be PR_ENTRYID.

Return Values

S_OK
The search path was successfully set.
MAPI_E_MISSING_REQUIRED_COLUMN
One of the containers described in the SRowSet structure did not include its PR_ENTRYID property.

Remarks

Clients and service providers call the IAddrBook::SetSearchPath method to save changes made to the container search order that is used to resolve names with IAddrBook::ResolveName. The search path is saved between instances of a session. This functionality means that, after a call to the IMAPISession::Logoff method, subsequent calls to the MAPILogonEx function during the same session return the same search path as previously set, as long as that search path still exists.

Clients and providers need not call the IMAPIProp::SaveChanges method to make the search path changes permanent.

See Also

IAddrBook::GetDefaultDir, IAddrBook::GetPAB, IAddrBook::GetSearchPath, PR_CONTAINER_FLAGS