Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the text body for the message.
Syntax
HRESULT GetTextBody(
[in] DWORD dwTxtType,
[in] ENCODINGTYPE ietEncoding,
[out] IStream **ppStream,
[out] LPHBODY phBody
);
Parameters
-
dwTxtType [in]
-
Type: DWORD
Specifies the type of text body to retrieve.
Value Meaning - TXT_PLAIN
- 0x00000001
Content-Type is text/plain. - TXT_HTML
- 0x00000002
Content-Type is text/html. -
ietEncoding [in]
-
Type: ENCODINGTYPE
Specifies an ENCODINGTYPE value that indicates how the data in ppStream should be encoded. Either IET_DECODED, IET_BINARY, or IET_UNICODE is a typical value for this parameter.
-
ppStream [out]
-
Type: IStream**
Receives an address to a pointer to the IStream object that contains the text body. The client is responsible for releasing this object.
-
phBody [out]
-
Type: LPHBODY
Receives the handle of the text body that was found.
Return value
Type: HRESULT
Returns one of the following values.
| Return code | Description |
|---|---|
|
Indicates success. |
|
Indicates that an unknown error has occurred. |
|
Indicates that an attempt to allocate memory failed. |
|
Indicates that the value specified by dwTxtType is not valid. |
|
Indicates that the message does not have a text body. |
|
Indicates that the text body that was found does not contain any data. |
Remarks
Typically, if a client supports HTML, the client would request TXT_HTML first. If that fails, then it would request TXT_PLAIN.
This method excludes bodies that are marked as attachments. The text body is usually what a client requests to display the body of a message to the user. MimeOLE treats a text/enriched type body as text/html and converts it to valid HTML.
For a MIME Encapsulation of Aggregate HTML Documents (MHTML) message, MimeOLE uses the start parameter that is associated with multipart/related bodies to locate the correct text body.
Requirements
| Minimum supported client |
Windows XP [desktop apps only] |
| Minimum supported server |
Windows Server 2003 [desktop apps only] |
| Product |
Outlook Express 6.0 |
| Header |
|
| IDL |
|
| DLL |
|