Download User Manual - TEWS TECHNOLOGIES
Transcript
…
//
// Set warning limit (channel 1)
//
LimitBuf.channel
= 1;
LimitBuf.limit
= 20;
success = DeviceIoControl (
hDevice,
// TDRV010 handle
IOCTL_TDRV010_SETLIMIT,
&LimitBuf,
// contains the input data
sizeof(LimitBuf),
// size of input buffer
NULL,
0,
&NumWritten,
// unused but required
NULL
// no overlapped I/O
);
if( success ) {
printf("\nChange Warning Limit successfully completed!\n");
}
else {
ErrorHandler("Device I/O control error");
// process error
}
ERROR CODES
ERROR_INVALID_PARAMETER
This error will be returned if the size of the write
buffer is too small.
ERROR_FILE_NOT_FOUND
Illegal channel number specified.
ERROR_OPEN_FILES
The channel must be in BUS OFF state to execute
this function.
TDRV010-SW-65 – Windows Device Driver
Page 88 of 94