TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Russell Coker
from: George Edwards
date: 1994-06-12 11:09:04
subject: Maximus Door

In a message on 09 Jun 94  00:28:16, Russell Coker writes:



 RC>    I am writing a Maximus door program, everything is working 

 RC> fine except that I don't know how to check for carrier detect.  

 RC> Could you please tell me how to do this using the file handle 

 RC> passed to my program from Maximus.  Also I would like to know how 

 RC> to change the state of the DTR line and read the state of the DSR 

 RC> line.



BOOL TestCarrier( HFILE hfPort )

{

   BYTE        bSigs = 0;

   ULONG       ulDataLen = 0;

   APIRET      apirc = 0;





   apirc = DosDevIOCtl( hfPort,

                        IOCTL_ASYNC,

                        ASYNC_GETMODEMINPUT,

                        NULL, 0, NULL,

                        (PVOID)&bSigs, sizeof( BYTE ), &ulDataLen );

   if( apirc != 0 )

      printf( "Error %s in ASYNC_GETMODEMINPUT\n", apirc );

   else

      if( bSigs & DCD_ON )

         return TRUE;



   return FALSE;

}



See function 0x66 (ASYNC_GETMODEMOUTPUT) for testing DTR.  See Note 1 to
Function 0x53 (ASYNC_SETDCBINFO) for some info about DTR/RTS.  (Pages
18-45, 18-44, and 18-21 of the Physical Device Driver Reference.)





Cheers, George





--- Harry/2

* Origin: A Point just left of X:Y:Z (3:632/340.7)
SEEN-BY: 54/54 620/243 632/300 301 340 341 344 348 350 365 386 403 456 486
SEEN-BY: 632/998 633/371 634/384 635/210 502 503 636/100 638/100 640/820
SEEN-BY: 690/660 711/409 413 430 807 808 809 934 712/353 623 713/888 800/1
SEEN-BY: 2442/0
@PATH: 632/340 341 350 386 635/503 632/348 711/409 54/54 711/808 809 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™.