LibTiePie  0.4.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages
Removed

Description

Events indicating a device is removed.

LibTiePie can inform the calling application that a device is removed in different ways:

Functions

void DevSetCallbackRemoved (TpDeviceHandle_t hDevice, TpCallback_t pCallback, void *pData)
 Set a callback function which is called when the device is removed. More...
 
void DevSetEventRemoved (TpDeviceHandle_t hDevice, int fdEvent)
 Set an event file descriptor which is set when the device is removed. More...
 
void DevSetEventRemoved (TpDeviceHandle_t hDevice, HANDLE hEvent)
 Set an event object handle which is set when the device is removed. More...
 
void DevSetMessageRemoved (TpDeviceHandle_t hDevice, HWND hWnd, WPARAM wParam, LPARAM lParam)
 Set a window handle to which a WM_LIBTIEPIE_DEV_REMOVED message is sent when the device is removed. More...
 

Function Documentation

void DevSetCallbackRemoved ( TpDeviceHandle_t  hDevice,
TpCallback_t  pCallback,
void *  pData 
)

Set a callback function which is called when the device is removed.

Parameters
hDeviceA device handle identifying the device.
pCallbackA pointer to the callback function. Use NULL to disable.
pDataOptional user data.
Status values
INVALID_HANDLEThe handle to the device is invalid.
DEVICE_GONE The device indicated by the device handle is no longer available.
SUCCESS The function executed successfully.
Since
0.4.0
void DevSetEventRemoved ( TpDeviceHandle_t  hDevice,
int  fdEvent 
)

Set an event file descriptor which is set when the device is removed.

Parameters
hDeviceA device handle identifying the device.
fdEventAn event file descriptor. Use <0 to disable.
Status values
INVALID_HANDLEThe handle to the device is invalid.
DEVICE_GONE The device indicated by the device handle is no longer available.
SUCCESS The function executed successfully.
Note
This function is only available on GNU/Linux.
Since
0.4.0
void DevSetEventRemoved ( TpDeviceHandle_t  hDevice,
HANDLE  hEvent 
)

Set an event object handle which is set when the device is removed.

Parameters
hDeviceA device handle identifying the device.
hEventA handle to the event object. Use NULL to disable.
Status values
INVALID_HANDLEThe handle to the device is invalid.
DEVICE_GONE The device indicated by the device handle is no longer available.
SUCCESS The function executed successfully.
Note
This function is only available on Windows.
Since
0.4.0
void DevSetMessageRemoved ( TpDeviceHandle_t  hDevice,
HWND  hWnd,
WPARAM  wParam,
LPARAM  lParam 
)

Set a window handle to which a WM_LIBTIEPIE_DEV_REMOVED message is sent when the device is removed.

Parameters
hDeviceA device handle identifying the device.
hWndA handle to the window whose window procedure is to receive the message. Use NULL to disable.
wParamOptional user value for the wParam parameter of the message.
lParamOptional user value for the lParam parameter of the message.
Status values
INVALID_HANDLEThe handle to the device is invalid.
DEVICE_GONE The device indicated by the device handle is no longer available.
SUCCESS The function executed successfully.
Note
This function is only available on Windows.
Since
0.4.0