Share via


INNTPOnPostEarly Interface

Topic Last Modified: 2006-06-13

The INNTPOnPostEarly interface defines the interface between event sinks written with Collaboration Data Objects (CDO) and the Network News Transfer Protocol (NNTP) service OnPostEarly event source.

CLSID

CD000033-8B95-11D1-82DB-00C04FB1625D

Extends

IDispatch

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Member Summary

The following table lists the methods of the INNTPOnPostEarly interface.

Name Description

OnPostEarly

Called by the NNTP event source on bound OnPostEarly event sinks when message or news feed headers arrive to the NNTP service before the message content has arrived.

Remarks

To implement an NNTP OnPostEarly event sink using CDO, you create and register a local Component Object Model (COM) class that exposes the CDO INNTPOnPostEarly interface.

For more information about implementing NNTP OnPostEarly event sinks, see SMTP/NNTP Transport Event Sinks with CDO.

Examples

[C++,IDL]

#include "StdAfx.h"
#include "sinkproj.h"  // contains guids for this class
#include "resource.h"
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace
#import "c:\program files\common files\microsoft shared\cdo\cdoex.dll" raw_interfaces_only no_namespace

class ATL_NO_VTABLE CMyClass :
    public CComObjectRootEx<CComSingleThreadModel>,
    public CComCoClass<CMyClass,&CLSID_MyClass>,
    public IDispatchImpl<INNTPOnPostEarly,&__uuidof(INNTPOnPostEarly),&LIBID_MyClass>
{
public:
     CMyClass() {}
DECLARE_REGISTRY_RESOURCEID(IDR_MyClass)
DECLARE_NOT_AGGREGATABLE(CMyClass)

BEGIN_COM_MAP(CMyClass)
  COM_INTERFACE_ENTRY(INNTPOnPostEarly)
  COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// INNTPOnPostEarly
public:
   STDMETHOD(OnPostEarly) (/* in */ IMessage* pMsg, /* in,out */ CdoEventStatus* EventStatus);
private:
   // any other custom methods you wish to use
   
};

CMyClass::OnPostEarly( IMessage* pMsg, CdoEventStatus* EventStatus)
{
   // TODO:  add sink code here
}

[Visual Basic]

' References to ADO 2.5 and CDO for Microsoft Exchange
Implements CDO.INNTPOnPostEarly

Private Sub INNTPOnPostEarly_OnPostEarly( ByVal Msg as IMessage,  EventStatus as CdoEventStatus )
  '  Add handling code here
End Sub

[VBScript]

<SCRIPT LANGUAGE="VBScript">
Sub INNTPOnPostEarly_OnPostEarly( ByVal Msg, EventStatus)
  ' Add sink code here
End Sub
</SCRIPT>