[comp.windows.ms.programmer] Communications Ports

dweinste@isis.cs.du.edu (David Hills Weinstein) (11/16/90)

Does anyone have (or know of) publically available code snippets using
the Windows 3.0 calls for dealing with the COM ports?  If anyone could
either post or mail such snippets (or give directions to a publically
available FTP site which had such source code), I would greatly appreciate
it.

Thanks,
   --Dave Weinstein

-- 
Dave Weinstein
Internet: dweinste@isis.cs.du.edu
Disclaimer: If you believe that I speak for my employer on Usenet, please
            take time from your busy schedule to consult professional help.

buddington-paul@cs.yale.edu (Paul Buddington) (11/24/90)

In article <1990Nov15.173419.5619@isis.cs.du.edu> dweinste@isis.cs.du.edu (David Hills Weinstein) writes:
>Does anyone have (or know of) publically available code snippets using
>the Windows 3.0 calls for dealing with the COM ports?  If anyone could
>either post or mail such snippets (or give directions to a publically
>available FTP site which had such source code), I would greatly appreciate
>it.
>
>Thanks,
>   --Dave Weinstein

On a related note, does anyone know if there's a way to give a DOS program 
exclusive rights to a COM port (under Windows)?  Right now, the best that I
can do is to wait for the stupid error message (port conflict) to appear
and then restore the DOS window.  A timeout is not good enough because I
frequently leave the connection open in the background.  I need to insure that
nobody can accidently cut me off be starting another session of my 
communications program which would re-initialize the modem.  I would like to
be able to give the program exclusive rights to the modem and only have 
Windows notify me if another program tries to use it.  The main problem lies
in the fact that Windows itself initially seems to have control of the
COM ports.

Thanks in advance.
Paul Buddington
(Buddington_Paul@CS.Yale.Edu)