home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.apps
- Path: sparky!uunet!destroyer!gatech!nntp.msstate.edu!Isis.MsState.Edu!it1
- From: it1@ra.msstate.edu (Tim Tsai)
- Subject: Borland C++ 3.1 for Windows
- Message-ID: <it1.721250566@Isis.MsState.Edu>
- Organization: Mississippi State University
- Date: Sun, 8 Nov 1992 19:22:46 GMT
- Lines: 16
-
- Has anybody used the Windows communications API under Borland C++ 3.1
- yet? I copied the example from Borland C++'s help (basically it opens
- COM2: and sets it to 19,200 baud, and that's it!). I noticed that if I
- do *not* close the COM port when the program terminates, WPS locks up.
- Closing the COM port sometimes will generate a General Protection fault.
- Any ideas?
-
- Here's the code fragment from memory:
-
- idComDev = OpenComm("COM2", 1024, 128);
- err = BuildCommDCB("COM2:19200,n,8,1", &dcb);
- SetCommState(&dcb);
-
- Thanks..
-
- PS: Mouse is on COM1
-