HrGetAutoDiscoverXML

Applies to: Outlook 2013 | Outlook 2016

Returns an Extensible Markup Language (XML) stream that represents information retrieved from the auto-discovery service of a Microsoft Exchange 2007 server.

Quick info

Property Value
Exported by:
olmapi32.dll
Called by:
Client
Implemented by:
Outlook
HRESULT HrGetAutoDiscoverXML( 
    __in_z const WCHAR *pwzAddress, 
    __in_opt_z const WCHAR *pwzPassword, 
    __in_opt HANDLE hCancelEvent, 
    __in_opt ULONG ulFlags, 
    __out IStream** ppXmlStream); 

Parameters

pwzAddress

[in] A null-terminated Simple Mail Transfer Protocol (SMTP) email address of the account for which you want to retrieve the auto-discovery information.

pwzPassword

[in] An optional password for the account specified by pwzAddress. Note that passing any password has no effect if the account specified by pwzAddress does not require a password.

hCancelEvent

[in] An unset Win32 event handle that is optional and can be used to cancel the operation. To cancel the operation, set the event and pass the event handle as hCancelEvent; pass null if you do not want to cancel the operation. Note that passing a value that does not represent an event handle has no effect and is ignored by the function.

ulFlags

[in] This parameter is not used. It must be 0.

ppXmlStream

[out] A pointer to an IStream object that contains the autodiscovery XML. Returns null if the autodiscovery operation fails. You must release the IStream object when you are finished with it.

Return values

S_OK

  • The function call is successful.

E_INVALIDARG

  • pwzAddress is null or is not a valid SMTP address, or ppXmlStream is a null pointer to an IStream object.

MAPI_E_NOT_FOUND

  • Client computer is not connected to the network, client computer is not connected to a Microsoft Exchange 2007 server, pwzAddress is not an account on an Exchange 2007 server, or pwzAddress is an account that does not support Exchange auto-discovery service.

MAPI_E_USER_CANCEL

  • An event handle has been passed to hCancelEvent to cancel the operation.

STRSAFE_E_INSUFFICIENT_BUFFER

  • The value passed to pwzAddress or pwzPassword is too long, such that it overflows the internal buffer of size 256 bytes.