Changing COMM properties using a TAPI Handle in Windows 95 and NT 4.0

Changing COMM properties using a TAPI Handle in Windows 95 and NT 4.0

Post by Scott Bus » Tue, 21 Apr 1998 04:00:00



I am having an unusual problem setting comm properties after a call to
"LINEOPEN" on Windows NT.

I have a program that creates two threads for handling reading and writing
from/to the TAPI line.  After calling "LINEMAKECALL",  the threads are
created after the line replies back and proceeds to dial the number.  These
threads use the handle acquired in the VARSTRING structure passed from
"LINEGETID" to modify port timeouts and set event flags to watch for.  The
API calls are:

        "GETCOMMTIMEOUTS/SETCOMMTIMEOUTS"     "GETCOMMMASK/SETCOMMMASK".

In both Windows 95 and Windows NT, the "GET" commands work correctly
passing back the correct information.  But in Windows NT, when I try
setting a value by calling the "SET" commands, I receive the error "Invalid
File Handle".  Windows 95 works perfectly.

The weird thing is that in Window NT, after receiving a reply that the
connection has been made on the line, the commands begin working correctly.
 Because the "GET" commands always have worked and because the "SET"
commands work after a connection is made, I know the handle I am passing it
is valid.

Is there a security or privilege in Windows NT I must set to alter line
characteristics before a connection or is there a way to set port timeouts
and events without the two commands listed above?

Any help would be greatly appreciated.  Thanks.

Scott