Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WsReadEndpointAddressExtension function

Reads an extension of the WS_ENDPOINT_ADDRESS.


HRESULT WINAPI  WsReadEndpointAddressExtension(
  _In_     WS_XML_READER*                     reader,
  _In_     WS_ENDPOINT_ADDRESS*               endpointAddress,
  _In_     WS_READ_OPTION                     readOption,
  _In_     WS_HEAP*                           heap,
           void*                              value,
  _In_     ULONG                              valueSize,
  _In_opt_ WS_ERROR*                          error


reader [in]

The XML reader to use to read the extension.

The function will automatically set the input of the reader as necessary to read the extensions.

endpointAddress [in]

The endpoint address containing the extensions.

extensionType [in]

The type of extension to read.

readOption [in]

Whether the value is required, and how to allocate the value. See WS_READ_OPTION for more information.

This parameter must have one of the following values:

heap [in]

The heap to use to store the value that is read.


The address of a buffer to place the value read.

If using WS_READ_REQUIRED_VALUE for the readOption parameter, the buffer must be the size of the type of extension being read (which varies by WS_ENDPOINT_ADDRESS_EXTENSION_TYPE).

If using WS_READ_REQUIRED_POINTER or WS_READ_OPTIONAL_POINTER, the buffer should be the size of a pointer.

valueSize [in]

The size of the buffer that the caller has allocated for the value read.

This size should correspond to the size of the buffer passed using the value parameter.

error [in, optional]

Specifies where additional error information should be stored if the function fails.

Return value

This function can return one of these values.

Return codeDescription

The extension type was not valid.

The size of the supplied buffer was not correct.

A required parameter was NULL.


The input data was not in the expected format or did not have the expected value.


Ran out of memory.

Other Errors

This function may return other errors not listed above.



The returned value is valid until the heap is freed or reset.

If the requested extension type appears more than once in the extensions buffer, then the first instance is returned.


Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]









Community Additions

© 2017 Microsoft