API header.varSource = 1 ' event soruce id header.szFmtProgId = "TcEventFormatter.TcXmlFormatter" ' event prog id ' creade event params Dim arrParam() As Variant ReDim arrParam(0 To 1) As Variant arrParam(0) = 1234 ' first parameter as long arrParam(1) = 1234.777 ' second parameter as double ' log the event Dim evt As TcEvent Set evt = evtLoggerC.ReportEventEx(header, arrParam) ' reset the event evt.Reset Remarks After this method call the Event Logger will raise the event OnNewEvent [ } 145] on all client that implement the event interface _ITcEventLogEvents [ } 144] (VB: Dim WithEvents).
Also see about this 2 TcEventHeader [ } 181] 9.3.5 ITcEventLogEvents The _ITcEventLogEvents is the standard event interface of the main class of the TcEventLogger [ } 127] . The interface provides the callback method to keep a client in sync with the actual state of the TcEvent Logger. The interface derives from IDispatch so that it could be used by all languages that support COM automation interfaces. IDispatch itself derives from IUnknown. Table 19: Methods in Vtable Order TcEventLogger 144 Version:
1.1 IUnknown Methods Description QueryInterface returns a pointer to the interface you query for AddRef Increments the reference counter Release Decrements the reference counter IDispatch Methods Description GetIDsOfNames Maps a single member name and an optional set of parameter names to a corresponding set of integer dispatch identifiers (DISPIDs), which can then be used on subsequent calls to IDispatch::Invoke. GetTypeInfo Retrieves the type information for an object. GetTypeInfoCount Retrieves the number of type information interfaces that an object provides, either 0 or 1. Invoke Provides access to properties and methods exposed by an object.
ITcEventLog Methods Description OnNewEvent [} 145] This event method is called when a new event was issued OnConfirmEvent [} 171] This event method is called when an event was confirmed OnResetEvent [} 146] This event method is called when an event was reset OnSignalEvent [} 174] This event method is called when an event was signaled OnActiveEventsCleared [} 148] This event method is called when all active events are cleared OnLoggedEventsCleared [} 148] This event method is called when all logged events are cleared OnClearEvent [} 149] This event method is called when one events is cleared