RegisterUIMessageCallbackEx Method

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Syntax

Engine.RegisterUIMessageCallbackEx ( callbackFuncAddr)

Purpose

Registers a C function as the user interface message event callback.

Note  National Instruments recommends using the Application Manager control with the ApplicationMgr.AfterUIMessageEvent and ApplicationMgr.UIMessageEvent events as needed. Refer to the example user interface applications TestStand provides, located in the <TestStand>\UserInterfaces directory.

Remarks

You can use a C function as the Event callback, instead of using ActiveX events or polling. Ensure the Engine.UIMessagePollingEnabled property is False or TestStand does not call the callback.

The callback function must use the following C function prototype:

void __cdecl UIMessageCallback(struct IDispatch *UIMessageDisp);

The UIMessageDisp parameter is the IDispatch pointer to a UIMessage object. Because this pointer is passed to the callback as a parameter, do not release it when you finish using it.

Note  Use this method only inside of the sequence editor or user interface.

Parameters

callbackFuncAddr As Variant

[In] Specifies the address of the callback function. The type of the variant must match the pointer size for the current platform, for example VT_UI4 for 32-bit TestStand and VT_UI8 for 64-bit TestStand.


See Also

Engine.GetUIMessage

Engine.UIMessageEvent

Engine.UIMessagePollingEnabled

StationOptions.UIMessageDelay

StationOptions.UIMessageMinDelay

WAS THIS ARTICLE HELPFUL?

Not Helpful