Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
ASYNC_SETBAUDRATE (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSDEVIOCTL
USHORT DosDevIOCtl(0L, pusBitRate, 0x0041, 0x0001, hDevice)
PUSHORT pusBitRate; /* pointer to variable with baud rate */
HFILE hDevice; /* device handle */
The ASYNC_SETBAUDRATE function sets the baud rate for the specified serial
device. The baud rate specifies the number of bits per second that the
serial device transmits or receives.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pusBitRate Points to the variable that contains the baud rate. This
parameter can be any one of the following values: 110, 150, 300,
600, 1200, 2400, 4800, 9600, or 19200.
hDevice Identifies the serial device that receives the device-control
function. The handle must have been created previously by using
the DosOpen function.
Return Value
The return value is zero if the function is successful or an error value if
the specified baud rate is out of range or an error occurs.
Comments
The initial rate for a serial device is 1200 baud. Once the rate is set, it
remains unchanged until set again, even if the device is closed and then
reopened.
See Also
DosOpen, ASYNC_GETBAUDRATE
♦