Problems with ReadFile in Win 98
Posted on 2003-03-07
The project i'm working on is to do some serial communication for GPS receivers. I have written and executed a program using Win NT, which creates a handle to a com port and reads the data from a GPS and outputs 1: to the screen and 2: to a file. This works fine!( in NT) I have now taken said .exe and run it on Win 98 and Win 95 in both these operating systems the program hangs. When I run debug on the 98 system the program stops at the ReadFile command. This is the code:
void read_port(void* sPort, void* cfile)
unsigned long read_nbr;
ReadFile(sPort, &buffer,1, &read_nbr,NULL);
cout << buffer;
I am stuck, I need the program to run on 95 and 98 most of all, if you guys can help i would be most greatfull.
BTW it was from postings on this site that i managed to write the prog in the first place, so thanks.