RegisterEventCategory

See Also   Tasks   Example   Applies To

Registers each custom event category the component will use. Components are not required to use custom categories, so this function is optional.

You define event categories to provide some context as to how an event is used and help the Visual Studio Analyzer user locate a particular event or group of events.

Syntax

Visual Basic object.RegisterEventCategory(guidSourceID As String, guidCategoryID As String, guidParentID As String, strVisibleName As String, strDescription As String, strIconFile As String, nIcon As Long)
Visual C++ HRESULT RegisterEventCategory([in] REFGUID guidSourceID,
[in] REFGUID guidCategoryID,
[in] REFGUID guidParentID,
[in] LPCOLESTR strVisibleName,
[in] LPCOLESTR strDescription,
[in] LPCOLESTR strIconFile,
[in] long nIcon);
Visual J++ object.RegisterEventCategory(String guidSourceID, String guidCategoryID, String guidParentID, String strVisibleName, String strDescription, String strIconFile, int nIcon);

Parameters

object

A unique instance of the installer object.

guidSourceID

A unique identifier for this component.

guidCategoryID

A unique identifier for this event category.

guidParentID

The parent category, or a string if the category is at the top level. You can arrange event categories in a hierarchy, which allows you to define the level of categorization you need. For example, Visual Studio Analyzer uses a hierarchy of event categories for Performance Monitor data to represent different objects and instances.

strVisibleName

The name of the category. This name is visible to the Visual Studio Analyzer user. You must use Unicode characters from the ANSI character set for the name.

strDescription

The description of the event category. This name is visible to the Visual Studio Analyzer user. You must use Unicode characters from the ANSI character set for the description.

strIconFile

Not used; specify an empty string.

nIcon

Not used; specify an empty string.