A callback VI contains code to handle a .NET event you specify.
You must create a callback VI to handle events from .NET objects when the objects generate the
registered events. The callback VI runs when the event occurs. When you create a
callback VI, LabVIEW NXG creates a reentrant VI that you can open and edit to handle an
event. A callback VI contains the following elements:
- Event Common Data
- Event Source—Specifies the source of the event, such as LabVIEW NXG or
.NET. A value of 2 indicates a .NET event.
- Event Type—Specifies which event occurred. This is an enumerated type
for user interface events and a 32-bit unsigned integer type for .NET
and other event sources.
- Time Stamp—Specifies the time, in milliseconds, that the event was
generated.
- Control Reference—Specifies a reference to the .NET object on which the event
occurred.
- Event Data—Specifies the parameters specific to the event the callback VI
handles. LabVIEW NXG determines the appropriate Event Data when you select an
event from the Register Event Callback node. If an event
does not have data associated with it, LabVIEW NXG does not create this control
in the callback VI.
- Event Data Out—Specifies the modifiable parameters specific to the event the
callback VI handles. This element is available only if the .NET event has output
parameters.
- user parameter—Specifies data that you want to pass to the
callback VI when the .NET object generates the event.

Note
You can use an existing VI as a
callback VI as long as the connector pane of that VI matches the connector pane of the
event data. The callback VI must be reentrant and the reference to the callback VI must
be strictly typed.