WsSendReplyMessage function
Sends a message which is a reply to a received message.
Syntax
HRESULT WINAPI WsSendReplyMessage( _In_ WS_CHANNEL* channel, _In_ WS_MESSAGE* replyMessage, _In_ const WS_MESSAGE_DESCRIPTION* replyMessageDescription, _In_ WS_WRITE_OPTION writeOption, const void* replyBodyValue, _In_ ULONG requestBodyValueSize, _In_ WS_MESSAGE* requestMessage, _In_opt_ const WS_ASYNC_CONTEXT* asyncContext, _In_opt_ WS_ERROR* error );
Parameters
- channel [in]
-
A pointer to the Channel object on which to send the reply Message. The pointer must reference a valid WS_CHANNEL object.
- replyMessage [in]
-
A pointer to the Message object for sending the reply. The pointer must reference a valid WS_MESSAGE object. Message object state must be set to WS_MESSAGE_STATE_EMPTY or WS_MESSAGE_STATE_INITIALIZED.
Note If an initialized message is provided it must be initialized using WS_REPLY_MESSAGE or WS_FAULT_MESSAGE. - replyMessageDescription [in]
-
A pointer to a WS_MESSAGE_DESCRIPTION object. The action field of WS_MESSAGE_DESCRIPTION is used as the action header for the reply message. This field can be NULL if no action is required.
The bodyElementDescription field of the WS_MESSAGE_DESCRIPTION is used to serialize the body of the reply message. This field may be NULL if no body element is desired. See WsWriteBody for information about how the bodyElementDescription is used to serialize a value.
- writeOption [in]
-
Determines whether the body element is required, and how the value is allocated. See WS_WRITE_OPTION for more information.
- replyBodyValue
-
A void pointer to the value to serialize in the reply message.
- requestBodyValueSize [in]
-
The size in bytes of the reply value being serialized.
- requestMessage [in]
-
A pointer to a WS_MESSAGE object encapsulating the request message text. This is used to obtain correlation information used in formulating the reply message.
Note The message can be in any state except WS_MESSAGE_STATE_EMPTY. - asyncContext [in, optional]
-
A pointer to a WS_ASYNC_CONTEXT data structure with information about invoking the function asynchronously. A NULL value indicates a request for synchronous operation.
- 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 code | Description |
|---|---|
|
The asynchronous operation is still pending. |
|
The operation was aborted. |
|
The operation is not allowed due to the current state of the object. |
|
The connection with the remote endpoint was terminated. |
|
The input data was not in the expected format or did not have the expected value. |
|
The operation did not complete within the time allotted. |
|
A quota was exceeded. |
|
Security verification was not successful for the received data. |
|
A security operation failed in the Windows Web Services framework. |
|
A security token was rejected by the server because it has expired. |
|
Ran out of memory. |
|
One or more arguments are invalid. |
|
This function may return other errors not listed above. |
Remarks
The reply message will including correlation information as appropriate to the WS_ADDRESSING_VERSION. See Channel Layer Overview for more information about correlating request reply messages.
Requirements
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|