Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serial Communication under Windows
Message
From
10/02/1997 02:25:44
Narendra Lilaramani
Gentech Business Machines Ltd
Ahmedabad, India
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Serial Communication under Windows
Miscellaneous
Thread ID:
00019822
Message ID:
00019822
Views:
97
I am facing problems writing "Serial Communication" routines under Windows.I am trying these routines since last few months and with my experience, I have come accross foll Conclusions/problems

1) Using Windows APIs are two slow & unreliable. For example in one of my applications, I make InQue buffer as large as 30,000 bytes. Now I have a Do While LOOP ( in VFP3.0 or VB4.0 16 bit). In this loop I continiously read the COM port (at 9600,e,7,1with ReadComm API). Also I am displaying No. of Bytes read from the port in a Text Box, Displaying a Circle (for % completion of data dump). Now when I run this program under Windows 95 on a Pentium machineit works fine (bcz Pentium motherboard ha 16500 UART with 16 byte FIFO buffer). But if I run the same program under 486 machine (which has got 8250 UART by design with no FIFO buffer) the program does not work at all. Now if I remove graphics representation from my Do While loop & textbox updation, it works on 486.
i) Should not Windows' handle the COM Port on priority with InQueue buffer set to 30,000 bytes. It should atleast take the 30,000 bytes then if problem occurs its fine, but Windows is unable to even read more then 100 bytes in this loop.

2) I have also tried some routines in interrupt mode using COMMNOTIFY functions. But they just do not work while the data is dumped constantly from the COM Port.

This is causing great deal of problems, bcz my applications is to be distributed to the different clients who can have 486/pentium PCs. or can have Windows 95/NT or Win3.x While VFP & VB says it can make executables for all these platform in my case it will just not work. Shoul I tell my clients to be specifically use some H/W & Operating system. I think this is not proper &I can't do that. I am thinking of moving to DOS finally. And because of just the routine of communication will not work properly, user has to sacrifice "nice Windows interface" and other advantages of a database application on Windows.

Note : These types of behaviour is noted under BC++3.1 & PB4.x also.
Am I doing wrong? Or I may be I don't know how to write Serial comm functions under Windows (Which I don't accept, I have each & every APIs, tricks given in API bible)
Hint : Microsoft supplies MSCOMM32.OCX with VFP, why can't they supply 16 bit version of that? ( I am facing same problems with MSCOMM.VBX which was supplied earlier with VB)
Answers / Comments are most Welcome

Narendra
Next
Reply
Map
View

Click here to load this message in the networking platform