RegisterCustomEvent

See Also   Tasks   Example   Applies To

Registers each custom event the calling component might generate. A custom event is a user-defined event, usually an event that is specific to your component and that does not match any of the system-defined events included with Visual Studio Analyzer. For example, if your component is part of an order entry system, you might want one event to indicate when an order is submitted and another event to indicate when the order is shipped.

Syntax

Visual Basic object.RegisterCustomEvent(guidSourceID As String, guidEventID As String, strVisibleName As String, strDescription As String, nEventType As Long, guidCategory As String, strIconFile As String, nIcon As Long)
Visual C++ HRESULT RegisterCustomEvent([in] REFGUID guidSourceID,
[in] REFGUID guidEventID,
[in] LPCOLESTR strVisibleName,
[in] LPCOLESTR strDescription,
[in] long nEventType,
[in] REFGUID guidCategory,
[in] LPCOLESTR strIconFile,
[in] long nIcon);
Visual J++ object.RegisterCustomEvent(String guidSourceID, String guidEventID, String strVisibleName, String strDescription, int nEventType, String guidCategory, String strIconFile, int nIcon);

Parameters

object

A unique instance of the installer object.

guidSourceID

A unique identifier for this component.

guidEventID

A unique identifier for this event.

strVisibleName

The name of the event. 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. This description is visible to the Visual Studio Analyzer user. You must use Unicode characters from the ANSI character set for the description.

nEventType

The event type. Possible event types are OUTBOUND (the outbound, or call, part of a function or query); INBOUND (the inbound, or return, part of a function or query); GENERIC (neither outbound nor inbound); and MEASURED (caused by a periodic measurement, rather than by a specific event).

guidCategory

(Optional) The category for the event, or an empty string. Predefined event categories include STARTSTOP, CALLRETURN, QUERYRESULT, TRANSACTION, ALL, and MEASURED_ALL.

strIconFile

Not used; specify an empty string.

nIcon

Not used; specify an empty string.