Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
Returns an ADO Stream object containing the body part content in decoded format.
[Visual Basic] Function GetDecodedContentStream( ) as ADODB.Stream [C++] HRESULT GetDecodedContentStream( _Stream** pVal); [IDL] HRESULT GetDecodedContentStream([out,retval] _Stream** pVal);
CDO uses the current value of the ContentTransferEncoding property and the MIMEFormatted property to determine which encoding mechanism to use to decode or encode the contents of the implementing object. It is the programmer's responsibility to have the appropriate value set in ContentTransferEncoding.
The Stream object returned contains a read/write copy of the current (decoded) contents of the object implementing IBodyPart. If you modify the contents within the returned Stream object, you must call the Flush method to commit the changes back into the object.
The GetDecodedContentStream method return an error if called on an object that has Content-Type header field type set to "multipart."
To obtain the encoded content, use the GetEncodedContentStream method.
Dim iMsg as New CDO.Message Dim iBp as CDO.IBodyPart Set iBp = iMsg.BodyPart.AddBodyPart Dim Strm as ADODB.Stream Set Strm = iBp.GetDecodedContentStream Strm.WriteText "This is some text for the body part" Strm.Flush ' add more body parts, etc ... iMsg.Send