FireEvent

See Also   Tasks   Example   Applies To

Generates a registered event from the calling component.

Syntax

Visual Basic object.FireEvent(guidEvent As String, rgKeys, rgValues, rgCount As Long, dwFlags As eVSAEventFlags)
Visual C++ HRESULT FireEvent(
REFGUID
guidEvent,
int nEntries,
LPCDWORD rgKeys,
LPCDWORD rgValues,
LPCDWORD rgTypes,
DWORD dwTimeLow,
LONG dwTimeHigh,
VSAEventFlags dwFlags);
Visual J++ object.FireEvent(String guidEvent, Variant rgKeys, Variant rgValues, int rgCount, int dwFlags);

Parameters

object

A unique instance of the in-process event creator object.

guidEvent

The event being generated. Events have many possible parameters, which are specified in the rgKeys and rgValues arrays. In Visual C++, the parameter types are specified in the rgType array.

Visual C++: [in]

rgCount, nEntries

Number of entries in the rgKeys, rgValues, and rgTypes arrays.

Visual C++: [in]

rgKeys

Names of event fields passed for this event. See VSAStandardParameter for a list of available event fields. In Visual C++, the cVSAParameterKeyMask and cVSAParameterKeyString values in rgTypes define whether the event field names are passed as strings or as predefined indexes.

Visual C++: [in size_is(nEntries)]

Visual J++: This value must be initialized as a SafeArray or the call to FireEvent will fail.

rgValues

Values for the event fields passed for this event. In Visual C++, information in the rgTypes array defines whether the values are Unicode strings, ANSI strings, GUIDs, DWORDs, or BYTEArrays.

Visual C++: [in size_is(nEntries)]

Visual J++: This value must be initialized as a SafeArray or the call to FireEvent will fail.

rgTypes

Visual C++: [in size_is(nEntries)] Data types for values in the rgKeys and rgValues arrays. See VSAParameterType for more information.

dwTimeLow

Visual C++: [in] The local time of the event, or 0. (Low 32 bits.)

dwTimeHigh

Visual C++: [in] The local time of the event, or 0. (High 32 bits.)

dwFlags

Provides default values for a group of event parameters. See VSAEventFlags for more information.

Visual C++: [in]

Visual Basic: Possible values are cVSAEventStandard, cVSAEventDefaultSource, or cVSAEventDefaultTarget.

Remarks

Visual Basic: Use the rgKeys and rgValues arrays in the FireEvent call to pass information about the event. These arrays work together; the rgKeys array holds the names of the various fields for an event; the rgValues array holds the value for each field. You can dimension these arrays as either fixed-count or dynamic; for example:

Dim Keys (1 to 2) As String, Values (1 to 2) as String

Visual C++: Set the dwTimeLow and dwTimeHigh parameters using the return value of the QueryPerformanceCounter function. If you pass in 0 for these parameters, Visual Studio Analyzer defaults to the current time. If you know that the event happened at a different time, you should pass that time in.