Microsoft Chat Server Development Guide

Modify your extension's header file

  1. Unless you are going to use it for administering your component from a property page, you can remove the default inheritance and COM_INTERFACE_ENTRY for the default interface.
  2. Add the Chat callback interface to your new objects inheritance.
    For example:
    class ATL_NO_VTABLE CCustomCmd : 
       public CComObjectRootEx<CComSingleThreadModel>,
       public CComCoClass<CCustomCmd, &CLSID_CustomCmd>,
       public IDispatchImpl<IChatExtensionCallBack, 
    &IID_IChatExtensionCallBack, &LIBID_CHATSVCLib>,
       public IDispatchImpl<IChatServerCallBack, 
    &IID_IChatServerCallBack, &LIBID_CHATSVCLib>   
    
  3. Add COM_INTERFACE_ENTRY for each of the chat callback interfaces.
    For example:
    BEGIN_COM_MAP(CCustomCmd)
       COM_INTERFACE_ENTRY(IChatExtensionCallBack)
       COM_INTERFACE_ENTRY(IChatServerCallBack)
    END_COM_MAP()
    
  4. Add definitions for each of the pure virtual methods in the callback interfaces. A complete definition of the callback interfaces can be found in the sample file vc5\msgfilter\MessageFilter.h. Copy the ones you need into your project.

Note: All interface methods must be defined, but can return a "Not implemented" (E_NOTIMPL) error if they are not required.


© 1998 Microsoft Corporation. All rights reserved.