Platform SDK: CDO for Windows 2000

OnPostEarly Method

The OnPostEarly method is called by the Network News Transfer Protocol (NNTP) event dispatcher on registered OnPostEarly event sinks when message or news feed headers arrive to the NNTP service but before the message content has arrived.

[Visual Basic]
Sub OnPostEarly(ByVal Msg as CDO.Message, EventStatus as CdoEventStatus)
[C++]
HRESULT OnPostEarly(IMessage* Msg, CdoEventStatus* EventStatus);
[IDL]
HRESULT OnPostEarly([in] IMessage* Msg, [in,out] CdoEventStatus* EventStatus);

Parameters

Msg
An IMessage interface on a Message object that holds the arrived message headers and envelope fields.
EventStatus
On return, the status of the event. The event sink signals to the dispatcher whether to continue notifying subsequent event sinks of the event or to stop and return. The CdoEventStatus enumeration contains the possible values for this parameter.

Remarks

For OnPostEarly events, the Message object that is accessible to each sink contains only envelope fields and message header fields; when this event runs, the body of the message has not yet arrived. You can access the envelope fields for the message by using the IMessage.EnvelopeFields collection. You can access the message headers by using properties on the IMessage interface, such as the IMessage.Newsgroups property, or by using the IMessage.Fields collection. The message headers read-only but the envelope fields can be modified.

The OnPostEarly event for the NNTP service is synchronous, which means that the event dispatcher thread is blocked for the duration of time required for all bound event sinks to be created (if necessary) and executed, or until a sink preemptively stops event notifications by returning the EventStatus parameter with the value cdoSkipRemainingSinks.

See Also

SMTP/NNTP Transport Event Sinks with CDO

INNTPOnPost Interface

INNTPOnPostFinal Interface

IMessage Interface

CdoEventStatus Enum