This method lists all event sinks.
Syntax
ReplicationServer.EnumEventSinks(Iterator)
Parameters
Iterator
Used by the service to enumerate the list of parameters. This value should be initialized to zero, and should not be modified.
Remarks
The following event sink ProgIDs are defined:
CRSSink.CRSDBSink
The local database event sink. This event sink is also identified by its Name property, CRSLocalEvents.
CRSSink.CRSSink
The store-and-forward (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 NT event sink. . This event sink is also identified by its Name property, NT.
Example
The following example displays the names of all event sinks.
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 ReplError
dim EvSink
Wscript.Echo "The server has the following event sinks"
do while True
'Clear any error text
Err.Clear
set ReplSink = ReplServer.EnumEventSinks(Iterator)
'Quit if ReplSink is NUL
if IsEmpty(ReplSink) then exit do
'Quit if "No more items" error
ReplError = Err.Number
if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do
Wscript.Echo ReplSink.Name
Loop
'Release objects
set ReplSink = Nothing
set ReplServer = Nothing
See Also
AddEventSink, DeleteEventSink, ReplicationEventSinkConfig