Share via


LogMessage (Standard 7 SP1)

7/8/2014

Logs a message to the Windows Event Log.

Syntax

HRESULT LogMessage(
    [in] MessageType type,
    IObjectInfo* pObjectInfo,
    [in] BSTR szData
);

Parameters

  • type
    [in] Enumeration representing the type of message to log. Enumeration values include the following:

    lmWarning = 1 (Issues a warning under Admin.)

    lmError = 2 (Issues an error message under Admin.)

    lmHideWindow = 3 (Logs a message under Operational with information about a window that was obscured.)

    lmIgnoreWindow = 4 (Logs a message under Operational with information on how to manage a window.)

    lmActionPerformed = 5 (Logs a message under Operational with information on the window and action performed.)

    Note

    Warning and Errors can be called from the service or implementation. Hide, Ignore, and Action are called only from implementations that need to define instructions (as text) on how to manage the window. The default implementation generates XML to be added to the configuration in the szData field. Implementations can specify whatever is appropriate.

  • pObjectInfo
    An instance of the IObjectInfo interface.
  • szData
    [in] Specify instructions in XML format to add to a configuration file.

Return Value

This function returns the following:

Return value

Description

ERROR_SUCCESS

The operation completed successfully.

ERROR_INVALID_PARAMETER

A parameter is NULL or of the wrong type.

Remarks

Implementations can implement logging using any method or use the default logging which is sent to the Windows Event Log (under Applications and Services\Microsoft\Windows\DialogFilter).

Requirements

OS Versions: Standard 7

Header:

Link Library: DialogFilterXmlFilter.tlb

See Also

Reference

ObjectFilter Class
ObjectInfo Class
CheckWindowContents