| |
| BOOL WINAPI MimeGetNextMessageHeader(
|
| |
HMESSAGE hMessage, |
|
| |
LPTSTR lpszHeader, |
|
| |
INT cchMaxHeader, |
|
| |
LPTSTR lpszValue, |
|
| |
INT cchMaxValue |
|
| );
|
The MimeGetNextMessageHeader function returns the header
field name and value for the next header in the current message
part. This function is typically used in conjunction with
MimeGetFirstMessageHeader to enumerate all of the message
header fields and their values in the current message part.
Parameters
- hMessage
- Handle to the message.
- lpszHeader
- Pointer to the buffer which will contain a null-terminated
string that specifies the name of the first header in the current
message part. This parameter cannot be a NULL pointer.
- cchMaxHeader
- An integer which specifies the maximum number of characters
which may be copied into the buffer, including the terminating null
character. This parameter must have a value greater than zero.
- lpszValue
- Pointer to the buffer which will contain a null-terminated
string that specifies the value of the first header in the current
message part. This parameter may be a NULL pointer, in which case
the value of the header field is ignored.
- cchMaxValue
- An integer which specifies the maximum number of characters
which may be copied into the buffer, including the terminating null
character. If the lpszValue parameter is NULL, this
parameter should have a value of zero.
Return Value
If the function succeeds, the return value is non-zero. If no
more headers exist for the current message part, or the handle to
the message is invalid, the function will return zero. To get
extended error information, call MimeGetLastError.
Remarks
Each part in a multipart message has one or more header fields.
To obtain header values for the main message, rather than the
message attachments, the current part number must be set to zero
using the MimeSetMessagePart function.
The header fields from an imported message may not be returned
in the same order as which they appear in the message. An
application should never make an assumption about the order in
which one or more header fields are defined, with the following
exception:
If an imported message has multiple Received headers, then those
headers will be returned by MimeGetNextMessageHeader in the
order in which they appeared in the original message. Note that if
MimeGetMessageHeader is used to retrieve the Received
header, the first Received header in the message will be
returned.
Requirements
Client: Requires Windows 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cstools7.h.
Library: Use csmsgav7.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
MimeEnumMessageHeaders, MimeGetFirstMessageHeader,
MimeGetMessagePart, MimeParseHeader, MimeSetMessageHeader, MimeSetMessagePart
|
|