| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | ASYNC_SETLINECTRL How to use it? |
-=> Quoting Erwin Hogeweg to All <=-
EH> Hi,
EH> Can somebody please provide me with an example of how to set the nr of
EH> databits, the parity and the number of stopbits using DosDevIOCtl(). I
EH> am a little confused about the format and size of the parameterlist.
APIRET Comport::setLineCtrl(PLINECONTROL _plc)
{
ULONG ul = sizeof(LINECONTROL);
rc = DosDevIOCtl(hfHandle, IOCTL_ASYNC, ASYNC_SETLINECTRL,
_plc, sizeof(LINECONTROL), &ul,
NULL, 0, NULL);
if(rc != NO_ERROR) cerr FL "ASYSNC_SETLINECTRL rc = " << rc NL;
return rc;
}
APIRET Comport::getLineCtrl(PLINECONTROL _plc)
{
ULONG ul = 0;
rc = DosDevIOCtl(hfHandle, IOCTL_ASYNC, ASYNC_GETLINECTRL,
NULL, 0, NULL,
_plc, sizeof(LINECONTROL), &ul);
if(rc != NO_ERROR) cerr FL "ASYSNC_GETLINECTRL rc = " << rc NL;
return rc;
}
Also look at pmtermsr.(lzh|zip), it is a good example of using
DosDevIOCtl() with the com port.
A search at www.filez.com will find it, its on several ftp sites.
Phil Crown pcrown{at}airmail.net http://web2.airmail.net/pcrown/
--- Blue Wave/OS2 v2.30
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 972-250-4479 * (1:124/1208)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 124/1208 1 396/1 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.