|
BOOL GetNextHeader( |
|
LPTSTR lpszHeader, |
|
|
INT cchMaxHeader, |
|
|
LPTSTR lpszValue, |
|
|
INT cchMaxValue |
|
); |
BOOL GetNextHeader( |
|
CString& strHeader, |
|
|
CString& strValue |
|
); |
The GetNextHeader method returns the header field name and
value for the next header in the current message part. This method is
typically used in conjunction with GetFirstHeader to enumerate
all of the message header fields and their values in the current
message part.
Parameters
- lpszHeader
- A pointer to a string buffer that will contain the name of the
next 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
- A pointer to a string buffer that will contain the value of the
next 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 method 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 method will return zero. To get extended
error information, call GetLastError.
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
SetPart method.
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 GetNextHeader in the order in
which they appeared in the original message. Note that if
GetHeader is used to retrieve the Received header, the first
Received header in the message will be returned.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csmsgv10.lib
Unicode: Implemented as Unicode and ANSI versions.
See Also
EnumHeaders,
GetFirstHeader,
GetPart,
ParseHeader,
SetHeader,
SetPart
|
|