다음을 통해 공유


OnPost Method

Topic Last Modified: 2006-06-13

Called by the Network News Transfer Protocol (NNTP) event source on bound OnPost event sinks when a message has arrived to the NNTP service.

Applies To

INNTPOnPost Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

Sub OnPost(    ByVal Msg As CDO.Message,
        EventStatus As CdoEventStatus)
HRESULT OnPost
(
        IMessage* Msg,
        CdoEventStatus* EventStatus
);

Parameters

  • Msg
    An IMessage interface on a Message object holding the message that arrived.
  • EventStatus
    On return, the status of the event. The event sink signals to the source whether to continue notifying subsequent event sink of the event, or to stop and return. The CdoEventStatus Enum in the type library defines enumerated values for this argument.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

The Message object contains the message in unexpanded format. The recipient addresses have not been resolved or expanded, and are thus still in the format in which the sending message transfer agent (MTA) placed them in the message envelope. The sink cannot modify the contents of the posted message. The envelope fields, however, can be modified. For more information, see SMTP/NNTP Transport Event Sinks with CDO.

The OnPost event for the NNTP service is synchronous, meaning that the event dispatcher thread is blocked either for the length 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.