TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Richie Molinelli
from: Richie Molinelli
date: 1997-02-13 21:04:00
subject: Re: Notebook object

RM>How about a second question?  When you want to disconnect a
RM>communications session, that is break the connection with the remote
RM>modem, how is this done under OS/2?  Toggle DTR using the
RM>DosDevIoctl function?  And if so, do you have a snippet of code for
RM>that? Looking thru the header files it appears you can do it that
RM>way....but I haven't gotten it to work here ( using the
RM>ASYNC_SETLINECTL or ASYNC_SETMODEMCTL function

Ok...  Found my problem with the above.  You DO use the
ASYNC_SETMODEMCTRL function using the DTR_OFF value in the MODEMSTATUS
structure to lower DTR and DTR_ON flag to raise it.  My problem was I
wasn't allowing enuf time for the modem to detect the lowering of DTR.
By adding an event semaphore and blocking the calling thread till
carrier loss was detected, I solved this problem...unless someone has a
cleaner/easier way to show. :)

--- MsgToss 2.0c
* Origin: The Small Time BBS * (516) 579-7929 * [ Team OS/2 ] * (1:2619/172)
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: 2619/172 110 278/230 3615/50 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™.