Visual Assert – The Unit Testing Add-In for Visual C++
cfix – C/C++ Unit Testing for Win32 and NT
 
 

CreateEventSink

CreateEventSink

Synopsis

Event DLLs have to provide a single export named CreateEventSink. This routine serves as a factory routine for event sinks. The cfix runtime will call this routine once before starting a test run and will use the returned event sink to deliver all events to.

Declaration
CFIXAPI HRESULT CFIXCALLTYPE CreateEventSink(
	__in ULONG Version,
	__in ULONG Flags,
	__in_opt PCWSTR Options,
	__reserved ULONG Reserved,
	__out PCFIX_EVENT_SINK *Sink 
	);
				
Parameters

[in] Version: Event API Version the event sink is expected to support. In order to ensure binary compatibility with future framework versions, implementors should compare the value passed in this paramerer with CFIX_EVENT_SINK_VERSION and return CFIX_E_UNSUPPORTED_EVENT_SINK_VERSION in case of a mismatch.

[in] Flags: May contain the flag CFIX_EVENT_SINK_FLAG_SHOW_STACKTRACE_SOURCE_INFORMATION, indicating that stack traces should include source and line information. Implementors are free to ignore this flag.

[in] Options: Options string, may be used to allow users to pass additional information (e.g. a file path) to the DLL. The options string is not interpreted by the cfix runtim and may use any format.

[in] Reserved: Reserved, always 0.

[out] Sink: Resulting Event sink.

Requirements

Please note that although the Event API is only available in user mode, events generated by kernel mode unit tests are also delivered to an Event DLL.

Table 7.59. 

 User ModeKernel Mode
Available since1.7Not supported
HeaderDeclared in cfixevnt.hNot supported
Libraryn/aNot supported
DLLn/aNot supported