IMAQdxRegisterPnpEvent
Format
rval = IMAQdxRegisterPnpEvent (IMAQdxSession id, IMAQdxPnpEvent event, PnpEventCallbackPtr callbackFunction, void *callbackData);
Purpose
Configures the NI-IMAQdx driver to execute a callback function when a plug and play event occurs.
![]() |
Note Make sure that the code inside the callback is thread safe since the callback executes in a different thread. |
Parameters
Parameter | Type | Description |
id | IMAQdxSession | A valid Session ID, which you can obtain using IMAQdxOpenCamera. |
event | IMAQdxPnpEvent | The plug and play event to monitor. The following events are valid:
|
callbackFunction | PnpEventCallbackPtr | The address of the callback function. |
callback Data | void * | A pointer to user-defined data passed to the event function. |
Return Value
On success, this function returns IMAQdxErrorSuccess. On failure, this function returns an error code. You can obtain a more detailed error message with IMAQdxGetErrorString.