imaq1394ConfigEventMessage

NI-IMAQ for IEEE 1394 Cameras Function

imaq1394ConfigEventMessage

Format

rval = imaq1394ConfigEventMessage (SESSION_ID sessionID, int event, GUIHNDL windowHandle, int windowsMessageNumber, void *parameter);

Purpose

Configures the NI-IMAQ for IEEE 1394 Cameras driver to send a message to your application window when an event occurs. You must first register a callback function on a Windows message. The function you use to register the callback returns a Windows message used by the driver to notify your application. For more information, refer to the RegisterWinMsgCallback function in the following LabWindows/CVI menu: Library»User Interface»Callback Functions»Windows Interrupt Support.

In the callback function, the wParam parameter contains the event that sent the message. To send a message to the main thread, pass the window handle returned by GetCVIWindowHandle. To send a message to another thread, you must have created at least one top-level panel in that thread. Pass the window handle for that panel to imaq1394ConfigEventMessage. You can obtain the window handle for the top-level panel by calling GetPanelAttribute with the ATTR_SYSTEM_WINDOW_HANDLE attribute.

Parameters

Parameter Type Description
sessionId SESSION_ID A valid Session ID, which you can obtain using imaq1394CameraOpen2.
event int The event to monitor. The following events are valid:

FRAME_DONE

CAMERA_ATTACHED

CAMERA_DETACHED

windowHandle GUIHNDL The handle of the window that receives messages from the NI-IMAQ for IEEE 1394 Cameras driver. Use the following functions to get the handle:
  • GetCVIWindowHandle. The message is sent to the main thread.
  • GetPanelAttribute with the ATTR_SYSTEM_WINDOW_HANDLE attribute. The message is sent to the thread whose top-level panel handle was used with GetPanelAttribute.
windowsMessageNumber int The Windows message number returned by RegisterWinMsgCallback.
parameter void * A pointer to user-defined data passed to the event function.

Return Value

On success, this function returns IMG1394_ERR_GOOD. On failure, this function returns an error code. You can obtain a more detailed error message with imaq1394ShowError.