This method determines whether an event sink monitors an event.
Syntax
ReplicationEventSinkConfig.IsRegisteredForEvent(Event)
Parameters
Event
The event in question.
Remarks
You must have Site Server Publishing administrator privileges on the server to call this method.
See Crsmsg.bas, Crsmsg.h, or Crsmsg.inc in the SDK include directory for the list of events for Visual Basic, C/C++, and Active Server Pages, respectively.
Example
The following example displays the names of the event sinks that monitor CRS_EVENT_RECEIVING_ACL events.
Option Explicit
On Error Resume Next
const CRS_ERROR_NO_MORE_ITEMS = 0&80003B17
const CRS_EVENT_RECEIVING_ACL = 0&40003786
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim Iterator
Iterator = 0
dim EvSink
On Error Resume Next
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 EvMon
EvMon = EvSink.IsRegisteredForEvent(CRS_EVENT_RECEIVING_ACL)
if EvMon = True then
Wscript.Echo "Event sink " & EvSink.Name & " is monitoring" & " CRS_EVENT_RECEIVING_ACL events"
end if
Loop
'Release objects
set EvSink = Nothing
set ReplServer = Nothing
See Also
ReplicationServer.AddEventSink, ReplicationServer.EnumEventSinks