45
EventSinkConnect can poll all the outgoing interfaces exposed by an automation object. Most automation objects only expose one outgoing interface, however, it is possible for an object to expose more than one. When this happens, the only reliable way to detect which of the exposed interfaces is the default interface is by accessing the type library of the automation server, because IProvideClassInfo is not always implemented (this is an optional interface). Because type libraries are not always available, in particular for objects that only present their IDispatch interface, when you call EventSinkConnect with a null IID the subroutine always connects to the first outgoing interface listed by IConnectionPointContainer:EnumConnectionPoints.