Expand Minimize

WsRemoveHeader function

Removes the standard WS_HEADER_TYPE object from a message. The function is designed to handle types of headers that appear once in the message and are targeted at the ultimate receiver. Headers targeted with a role other than ultimate receiver are ignored.

For application-defined header types use the WsRemoveCustomHeader function.

Syntax


HRESULT WINAPI  WsRemoveHeader(
  _In_      WS_MESSAGE *message,
  _In_      WS_HEADER_TYPE headerType,
  _In_opt_  WS_ERROR* *error
);

Parameters

message [in]

A pointer to the Message object with the header to be removed. The message can be in any state except WS_MESSAGE_STATE_EMPTY.

headerType [in]

Indicates the type of header to be removed.

error [in, optional]

A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.

Return value

This function can return one of these values.

Return codeDescription
WS_E_INVALID_FORMAT

There are multiple instances of the type of header present in the message.

E_INVALIDARG

One or more of the parameters are incorrect.

Other Errors

This function may return other errors not listed above.

 

Remarks

If a header of the given type exists in the message it is removed. If the header does not exist, no action is taken and the function completes successfully.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

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

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft