IWSDOutboundAttachment::Close (Windows Embedded CE 6.0)

1/6/2010

This method closes the current attachment MIME data stream.

Syntax

HRESULT Close();

Parameters

This method has no parameters.

Return Value

The following table shows the possible error code return values.

Error code Description

S_OK

This method completed successfully. All data in the attachment stream was successfully transferred.

HRESULT_FROM_WIN32 (ERROR_INVALID_OPERATION)

Close was called before IWSDOutboundAttachment::Write was called. You must call Write before closing the attachment stream.

STG_S_BLOCK

Internal buffers were not available. The data in the attachment stream was not successfully transferred.

Remarks

Close is used to indicate that the application has no more data to transmit in the current attachment stream. The return value can indicate an error in a previous Write operation or an issue closing the connection.

Close may block while waiting for a previous Write operation to complete. Close may block for up to 30 seconds (per HTTP transmission timeouts) while waiting for a previous Write operation to complete.

The Close method may return successfully after a failed Close attempt that returned STG_S_BLOCK. A subsequent success indicates that the internal buffers were freed for use after the initial failed attempt. When STG_S_BLOCK is received by an application, the application can either call Close again or terminate the data transfer using the IWSDOutboundAttachment::Abort method.

Requirements

Header wsdapi.h
Library wsdapi.lib
Windows Embedded CE Windows Embedded CE 6.0 R2

See Also

Reference

IWSDOutboundAttachment
Web Services on Devices Interfaces