HrGetAutoDiscoverXML
HrGetAutoDiscoverXML |
Returns an Extensible Markup Language (XML) stream that represents information retrieved from the auto-discovery service of a Microsoft Exchange 2007 server.
Quick Info
Exported by: | olmapi32.dll |
Called by: | Client |
Implemented by: | Outlook |
|
Parameters
pwzAddress
[in] A null-terminated Simple Mail Transfer Protocol (SMTP) e-mail 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.