Microsoft Chat Server Development Guide

ChannelBlock Sample

This extension monitors the creation of channels and disallows those that are named using any of the strings in its blocking file (C:\BLOCKCH.TXT).

Description

This sample allows the administrator to define a list of channel names that cannot be created on the server. The sample checks the channel name during the pre-update OnNewChannel notification, and cancels those that match strings in its blocking file (C:\BLOCKCH.TXT). This sample also demonstrates how to create a property page that can manipulate data in an active extension. The property page is implemented by the ChannelBlockPP project found in the "PropertyPage" subdirectory.

Installation

This sample is built using Microsoft Visual Basic 5.0. You must have Microsoft Exchange Chat Service V5.5 SP1 installed.

To install the sample:

  1. Run "regsvr32 ChannelBlocking.dll" from the command line to register the extension.
  2. Run regcatid.reg by double-clicking from Windows NT Explorer.
  3. Run Chat Service Manager.
  4. Select the local server. Right-click on Extensions, and select New, then Add Extension….
  5. Select "ChannelBlockExtension.ChannelBlocking" from the list, and click OK.
  6. Restart the chat service.

Source Listing

The following files can be found in the chat documentation installation directory, in Samples\vb5\ChannelBlock:

File Purpose
ChannelBlocking.cls Visual Basic class module
ChannelBlocking.dll Chat server extension DLL

The following files can be found in the chat documentation installation directory, in Samples\vb5\ChannelBlock\PropertyPage:

File Purpose
ChannelBlockPP.ocx ChannelBlock property page component
Global.pag Visual Basic property page


© 1998 Microsoft Corporation. All rights reserved.