IWSDInboundAttachment::Read method (wsdattachment.h)
Retrieves attachment data from a message sent by a remote host.
HRESULT Read(
[out] BYTE *pBuffer,
[in] DWORD dwBytesToRead,
[out] LPDWORD pdwNumberOfBytesRead
);
[out] pBuffer
Pointer to a buffer receiving the data read from the attachment stream. The application program is responsible for allocating and freeing this data buffer.
[in] dwBytesToRead
Size of the pBuffer input buffer, in bytes.
[out] pdwNumberOfBytesRead
Pointer to a DWORD containing the number of bytes of data read from the attachment stream into the pBuffer input buffer.
Possible return values include, but are not limited to, the following:
Return code | Description |
---|---|
|
Method completed successfully. |
|
The end of the attachment stream has been reached. |
|
pBuffer is NULL. |
|
pdwNumberofBytesRead is NULL. |
The Read method allows an application to receive arbitrary data from a remote host in a MIME-encapsulated message attachment. WSDAPI will provide an object implementing this interface when an attachment stream is received as part of a message. The call to Read opens the inbound attachment stream and transfers the attachment data to the application's buffer. If Read returns S_OK or S_FALSE, pdwNumberofBytesRead is set to the number of bytes read, which may be less than the size of the buffer. The Read call may block on network traffic.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | wsdattachment.h (include Wsdapi.h) |
DLL | Wsdapi.dll |