RegOnDebugSuspend
- Updated2023-02-21
- 2 minute(s) read
RegOnDebugSuspend
LabWindows/CVI ActiveX Server Interface
CVI_ApplicationEventsRegOnDebugSuspend (CAObjHandle serverObject, ApplicationEventsRegOnDebugSuspend_CallbackType callbackFunction, void *callbackData, int enableCallbacks, int *callbackId);
![]() |
Note This function signature is shown as it appears when you create a client using the LabWindows/CVI ActiveX Controller Wizard. If you create a client for the LabWindows/CVI ActiveX server interface using a different development environment, the method you use to register events might differ. |
Purpose
Call this function to register a callback for the DebugSuspend event of the ApplicationEvents event class. When you register the callback, you must specify the CAObjHandle of the server object from which you want to receive events.
The callback function that you specify must have the following prototype:
HRESULT CVICALLBACK Callback (CAObjHandle caServerObjHandle, void *caCallbackData);
Parameters
Input | ||
Name | Type | Description |
serverObject | CAObjHandle | Pass the CAObjHandle of the server object from which you want to receive events. You must pass a CAObjHandle to a server object that supports ApplicationEvents events. |
callbackFunction | ApplicationEventsRegOnDebugSuspend_CallbackType | Pass the function that the LabWindows/CVI ActiveX Library calls when the server fires a DebugSuspend event. The callback function that you specify must have the following prototype: HRESULT CVICALLBACK Callback (CAObjHandle caServerObjHandle, void *caCallbackData); |
callbackData | void * | Pass a value that you want the LabWindows/CVI ActiveX Library to pass to the callback as the caCallbackData parameter. Do not pass the address of a local variable or any other variable that might not be valid when the callback is executed. |
enableCallbacks | integer | Specifies whether this registration function enables the registered callbacks for the server. Pass 1 to enable all of the registered callbacks in the ApplicationEvents class associated with the server object passed in the serverObject parameter of this function. Pass 0 to specify that this call to the registration function will not enable the callbacks. Once the callbacks in the ApplicationEvents class have been enabled for a particular server object, the value of this parameter is ignored for subsequent callback registration functions in the ApplicationEvents class. Typically, you pass 1 to enable callbacks immediately. Pass 0 when you have a set of callbacks that must be enabled simultaneously for you to properly respond to the server events. In this case, you must explicitly advise the server when you are ready to begin receiving events. You can advise the server either by passing 1 for this parameter when you register the final callback or by calling CA_EnableEventsForServerObject when you are ready to enable the callbacks. |
Output | ||
Name | Type | Description |
callbackId | integer * | A unique identifier for the callback. Pass this identifier to CA_UnregisterEventCallback to unregister the callback. Pass NULL if you do not want the callbackId. |
Return Value
Name | Type | Description |
status | HRESULT | A value indicating whether an ActiveX Library error occurred. Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. You can use CA_GetAutomationErrorString to get the description of an ActiveX Library error code. |