Skip to content

Latest commit

 

History

History
169 lines (137 loc) · 4.77 KB

nf-webservices-wsflushbody.md

File metadata and controls

169 lines (137 loc) · 4.77 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:webservices.WsFlushBody
WsFlushBody function (webservices.h)
Flushes all accumulated message body data that has been written.
WsFlushBody
WsFlushBody function [Web Services for Windows]
webservices/WsFlushBody
wsw.wsflushbody
wsw\wsflushbody.htm
wsw
f94c409b-94c0-4440-8587-74322777261f
12/05/2018
WsFlushBody, WsFlushBody function [Web Services for Windows], webservices/WsFlushBody, wsw.wsflushbody
webservices.h
Windows
Windows 7 [desktop apps \| UWP apps]
Windows Server 2008 R2 [desktop apps \| UWP apps]
WebServices.lib
WebServices.dll
Windows
19H1
WsFlushBody
webservices/WsFlushBody
c++
APIRef
kbSyntax
DllExport
WebServices.dll
WsFlushBody

WsFlushBody function

-description

Flushes all accumulated message body data that has been written.

When message uses WsWriteBody or XML Writer, the data is accumulated in a buffer. WsFlushBody subsequently performs the actual I/O.

WsFlushBody is typically used when channel I/O is set to WS_STREAMED_OUTPUT_TRANSFER_MODE, or when using an XML Writer set to use WS_XML_WRITER_STREAM_OUTPUT.

-parameters

-param message [in]

A pointer to the WS_MESSAGE structure containing the accumulated message body data.

-param minSize [in]

Specifies the minimum number of bytes that must be present in the message for the function to perform the data flush.

Note  If the message contains less than minSize WSFlushBody terminates without doing the I/O flush. A larger value will ensure that no I/O will be done until the larger value has been accumulated. This is useful for ensuring that larger chunks are used when doing I/O. And presuming that there is at least one byte of accumulated data a value of 0 in minSize guarantees that it will be flushed.
 

-param 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.

-param error [in, optional]

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

-returns

This function can return one of these values.

Return code Description
WS_S_ASYNC
The asynchronous operation is still pending.
WS_E_INVALID_FORMAT
The input data was not in the expected format or did not have the expected value.
E_INVALIDARG
One or more arguments are invalid.
E_OUTOFMEMORY
Ran out of memory.
Other Errors
This function may return other errors not listed above.

-remarks

This function is a "no-op" when WS_STREAMED_OUTPUT_TRANSFER_MODE is not set, or when using an XML Writer with WS_XML_WRITER_BUFFER_OUTPUT set.

This function is shortcut for calling WsFlushWriter for the XML Writer being used to write the message. Calling WsFlushWriter directly is equivalent to calling this function.