Previous in Contents Next in Contents

CLSID Property

This property specifies either the CLSID or ProgID of the event sink.

Syntax

ReplicationEventSinkConfig.CLSID

Remarks

This property is used by all event sinks.

The following ProgIDs are defined for the built-in event sinks:

CRSSink.CRSDBSink

The local database event sink, such as CRSLocalEvents.

CRSSink.CRSSink

The forwarding (to another Content Deployment site server) event sink.

CRSSink.CRSMailSink

The mail event sink. This event sink is also identified by its Name property, Mail.

CRSSink.CRSNTSink

The Windows NT event sink. This event sink is also identified by its Name property, NT.

Remarks

You must have Site Server Publishing administrator privileges on the server to get or set this property.

The ReplicationEventSinkConfig object can be either a user-defined event sink object or one of the installed Content Deployment event sinks, such as the OLEDB event sink or the Content Deployment event sink. You must set the CLSID property when you create your own event sink.

Example

The following example adds Project1's events to those that the Windows NT event sink monitors and commits the change.

Option Explicit 
On Error Resume Next

const CRS_ERROR_NO_MORE_ITEMS  = 0&80003B17

dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

dim Iterator
Iterator = 0
dim EvSink

do while True
  'Clear any error text
  Err.Clear
  'Get an event sink
  set EvSink = ReplServer.EnumEventSinks(Iterator)

  'Quit if empty object returned (no more instances)
  if IsEmpty(EvSink) then exit do

  'Quit if "No more items" error 
  dim ReplError
  ReplError = Err.Number
  if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do

  dim CLSID
  CLSID = EvSink.CLSID
  if CLSID = "NT" then
    EvSink.ProjectFilter("Project1")
    EvSink.Commit
    exit do
  end if
Loop

'Release objects
set EvSink     = Nothing
set ReplServer = Nothing

See Also

ReplicationServer.AddEventSink, ReplicationServer.EnumEventSinks


© 1997-2000 Microsoft Corporation. All rights reserved.