Share via


IWMSEventLog::LogEvent

banner art

Previous Next

IWMSEventLog::LogEvent

The LogEvent method sends an event to the Windows Event Viewer.

Syntax

  HRESULT LogEvent(
  
  IWMSNamedValues*
  
  pPluginNamedValues
  ,
  
  WMS_EVENT_LOG_LEVEL
  
  ErrorLevel
  ,
  
  long
  
  ErrorCode
  ,
  
  BSTR
  
  bstrAdditionalInfo
  
  );

Parameters

pPluginNamedValues

[in] Pointer to an IWMSNamedValues interface. The server passes this pointer to the plug-in when it calls the IWMSBasicPlugin::InitializePlugin method. The plug-in does not need to use the interface.

ErrorLevel

[in] Member of the WMS_EVENT_LOG_LEVEL enumeration type. This must be one of the following values.

Value Description
WMS_EVENT_LOG_LEVEL_ERROR Indicates significant problems that the end user must be informed of. Error events usually indicate a loss of functionality or data. For example, if a plug-in fails, it must, if possible, log an error event. The server disables any plug-in that logs an error. Furthermore, if an authentication or authorization plug-in fails, the server will no longer allow new connections or allow clients that are connected to request actions that require authorization.
WMS_EVENT_LOG_LEVEL_WARNING Indicates problems that are not immediately significant, but that can lead to future problems.
WMS_EVENT_LOG_LEVEL_INFORMATION Indicates infrequent but significant successful operations.

ErrorCode

[in] long containing the error code associated with the event. If the plug-in is sending an information or warning event, specify S_OK.

bstrAdditionalInfo

[in] BSTR containing additional information about the event.

Return Values

If the method succeeds, it returns S_OK.

Example Code

  

Requirements

Header: wmseventlog.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Previous Next