The IOCTL_SERIAL_LSRMST_INSERT DeviceIoControl operation enables or disables the placement of line status and modem status values into the regular data stream that an application acquires through the ReadFile function.
When this line-status and modem-status data placement mode is enabled, status values are preceded in the data stream by an escape character. The user-definable escape character is set by the IOCTL_SERIAL_LSRMST_INSERT operation. Status values consist of 1 to 3 BYTEs. See the Remarks section below for status value details.
dwIoControlCode = IOCTL_SERIAL_LSRMST_INSERT; // operation code lpInBuffer; // address of input buffer nInBufferSize; // size of input buffer lpOutBuffer = NULL; // address of output buffer; not used; must be NULL nOutBufferSize = 0; // size of output buffer; not used; must be zero lpBytesReturned; // address of actual bytes of output
If the BYTE is a nonzero value, it is the desired line-status and modem-status value escape character. The operation will turn the LSRMST_INSERT line-status and modem-status data placement mode on.
If the BYTE is zero, the operation will turn the LSRMST_INSERT line-status and modem-status data placement mode off.
The escape character can not be the XON or XOFF character.
If the operation succeeds, DeviceIoControl returns a nonzero value.
If the operation fails, DeviceIoControl returns zero. To get extended error information, call GetLastError.
Note that an application that uses this scheme must examine each character in the data stream to determine the presence of modem-status or line-status data.
The following values follow the designated escape character in the data stream if the LSRMST_INSERT mode has been turned on :
Value |
Meaning |
SERIAL_LSRMST_ESCAPE |
Indicates the reception of the escape character itself into the data stream. |
SERIAL_LSRMST_LSR_DATA |
Indicates that a line status change occurred, and data was available in the receive hardware buffer. Following this BYTE is a BYTE value of the line status register is the BYTE present in the receive hardware buffer when the line status change was processed. |
SERIAL_LSRMST_LSR_NODATA |
Indicates that a line status change occurred, but no data was available in the receive hardware buffer. |
SERIAL_LSRMST_MST |
Indicates that a modem status change occurred. Following this BYTE is a BYTE that is the value of the modem status register when the modem status change was processed. |
Questions:
file: /Techref/os/win/api/win32/func/src/f51_4.htm, 5KB, , updated: 2007/3/15 08:37, local time: 2024/11/9 09:55,
3.136.236.3:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f51_4.htm"> IOCTL_SERIAL_LSRMST_INSERT</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.