beautypg.com

Usb_tc08_get_last_error – Omega Speaker Systems 8 Channel Thermocouple USB Data Acquisition Module TC-08 User Manual

Page 31

background image

Technical reference

27

3.3.2.10 usb_tc08_get_last_error

short usb_tc08_get_last_error
(

short handle

)

This routine returns the last error for the unit specified by handle. If zero is passed
instead of a handle, the function returns the error associated with the last call to

usb_tc08_open_unit

or

usb_tc08_open_unit_async

.

Note: If an invalid handle is passed to a function, the function will fail. The error code,
however, cannot be associated with a unit so

usb_tc08_get_last_error

will not

retain an error code in this instance.

usb_tc08_get_last_error

will also fail if the

invalid handle is passed to it.

The error codes, also found in the C header file, are as follows:

User/Developer error codes:

Error
code

Error

Further information

0

USBTC08_ERROR_OK

No error occurred.

1

USBTC08_ERROR_OS_NOT_SUPPORTED

The driver supports Windows
XP SP2 and Vista.

2

USBTC08_ERROR_NO_CHANNELS_SET

A call to

usb_tc08_set_channel

is required.

3

USBTC08_ERROR_INVALID_PARAMETER

One or more of the function
arguments were invalid.

4

USBTC08_ERROR_VARIANT_NOT_SUPPORTED

The hardware version is not
supported. Download the latest
driver.

5

USBTC08_ERROR_INCORRECT_MODE

An incompatible mix of legacy
and non-legacy functions was
called (or

usb_tc08_get_single

was called while in

streaming

mode

.)

6

USBTC08_ERROR_ENUMERATION_INCOMPLETE

usb_tc08_open_unit_async

was called again while a
background enumeration was
already in progress.

Note: For more details on error codes, see

troubleshooting

.