msbdnBridgeReportEvent

[This is preliminary documentation and subject to change.]

The msbdnBridgeReportEvent function informs the MMR to record virtual interface events directly in the system event log.

HRESULT msbdnBridgeReportEvent(
  IN MSBDN_OUTPUT_SUBSYSTEM *Subsystem,
  IN WORD wType,    
  IN DWORD dwErrorCode,    
  IN LPCSTR szMessage  
);
 

Parameters

Subsystem
Address of an MSBDN_OUTPUT_SUBSYSTEM structure that contains details about the virtual interface implementation.
wType
A value that can be one of the following three standard Win32 error types: EVENTLOG_INFORMATION_TYPE, EVENTLOG_ERROR_TYPE, or EVENTLOG_WARNING_TYPE.
dwErrorCode
A value that can be a Win32 error code, a Windows Sockets error code, a standard system HRESULT value, or one of status codes defined in the Brerror.h header file. If this value is an error code, then the full textual description of the error message will be included with the event in the szMessage parameter.
szMessage
A Unicode string containing the message to record in the event log.

Return Values

Returns zero if the function was successful. If the function fails, the return value is non-zero. To get extended error information, call the Win32 function GetLastError. To locate more information on GetLastError, see Further General Information.

Remarks

The msbdnBridgeReportEvent function allows a virtual interface to easily record events in the event log. A virtual interface can also call the functions of the underlying Win32 event logging application programming interface (API). Using msbdnBridgeReportEvent reduces overhead for a virtual interface implementation.

The MMR implements msbdnBridgeReportEvent as an inline function in the Bridge.h header file. The msbdnBridgeReportEvent implementation calls the ReportEvent member of the MSBDN_BRIDGE_CALLBACKS structure for a specific virtual interface instance defined by an MSBDN_OUTPUT_SUBSYSTEM structure. An inline function by definition is a function whose code gets substituted in place of the actual call to that function. That is, whenever the compiler encounters a call to that function, it merely replaces it with the code itself, thereby saving overhead.

See Also

MSBDN_BRIDGE_CALLBACKS, MSBDN_OUTPUT_SUBSYSTEM