VSARegisterCustomEvent

See Also      Example   

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 doesn't 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

HRESULT VSARegisterCustomEvent([in, string] wchar_t *guidSourceID,
[in, string] wchar_t
*guidEventID,
[in, string] wchar_t
*strVisibleName,
[in, string] wchar_t
*strDescription,
[in] long
nEventType,
[in, string] wchar_t
*guidCategory);

Parameters

guidSourceID

A unique identifier for this component.

guidEventID

A unique identifier for this event.

strVisibleName

The name of the component or system that will be firing events. This name is visible to the user. You must use ANSI characters for the name.

strDescription

The description of the component or system that will be firing events. This name is visible to the user. You must use ANSI characters 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.