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.
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.