Microsoft Chat Server SDK Reference

Chat Service Administration

The following table describes each of the objects in the chat service administration object model.

Object Description
ChatAccount Each account object represents a group of users who can be granted exclusive access to a persistent channel.
ChatAccounts A collection of ChatAccount objects.
ChatBan This object represents a banned user or domain.
ChatBans A collection of ChatBan objects.
ChatClass The class object represents a group of users. Membership in a class is based on the characteristics of the connection .
ChatClasses A collection of ChatClass objects.
ChatConfiguration This is the root object in the chat service administration object model.
ChatExtension Using this object, the administrator can access the instance of an active chat server extension, and modify its priority ranking.
ChatExtensions A collection of active ChatExtension objects.
ChatUnboundExtensions A collection of inactive ChatExtension objects.
ChatMember This object represents the individual account member.
ChatMembers A collection of ChatMember objects.
ChatPersistentChannel This object can be used to manipulate the properties of persistent chat service channels.
ChatPersistentChannels A collection of ChatPersistentChannel objects.
ChatPortal A portal object is used to administer connections to other chat servers on the network.
ChatPortals A collection of ChatPortal objects.
ChatService This object represents the local chat service.

A reference to the ChatConfiguration root object cannot be created explicitly. It must be retrieved from the ChatServer object, using the Configuration property. This property returns a reference to the root object of the chat service administration object model, the ChatConfiguration object. In Microsoft® Visual Basic®, the ChatConfiguration object is declared as follows:

Dim ChatCfg As CHATCFGLib.IChatConfiguration

Note: To use the chat server administration objects from Visual Basic, you must add a reference to the "Microsoft Exchange Chat Configuration 1.0 Type Library."

Chat server extensions are able to access and manipulate chat service administration objects from within a callback.

Using the ChatConfiguration Object

The following example demonstrates how to update the ChatServer object with modifications made to the chat service object:

Private Sub Form_Load()
   '--- Get a new reference to the chatsvc
   Dim ChatSvc As New CHATSVCLib.ChatServer

   '--- Take a snapshot of the current service settings
   Dim ServiceObj As CHATCFGLib.IChatService
   Set ServiceObj = ChatSvc.Configuration.Service

   '--- Make service changes
   ServiceObj.SSPIProvider = "DPA"

   '--- Update the service settings on the server
   '--- NOTE: "Set" not required
   ChatSvc.Configuration.Service = ServiceObj

   '--- Check it was written successfully
   MsgBox ChatSvc.Configuration.Service.SSPIProvider
End Sub

As with other administration objects, first you must make a copy of the original configuration object, modify it, and write it back to the parent object or collection.

Cloning Existing Objects

It is possible to duplicate an existing object using the Add method of the associated collection. If you need to create several new objects at once,

Private Sub Form_Load()
   Dim myClass As CHATCFGLib.IChatClass

   '--- Create a new class "template" object
   Set myClass = ChatSvc.Configuration.ChatClasses.CreateItem

   '--- Create two new classes
   myClass.LogonMode = ctLogonAuthenticatedOnly
   ChatSvc.Configuration.ChatClasses.Add "Authenticated", myClass

   myClass.LogonMode = ctLogonAnonymousOnly
   ChatSvc.Configuration.ChatClasses.Add "Anonymous", myClass

End Sub

© 1998 Microsoft Corporation. All rights reserved.