Reading from COM3 c++

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
legit
LCD?
Posts: 4
Joined: Fri Aug 26, 2005 9:46 pm
Location: Denver, CO
Contact:

Reading from COM3 c++

Post by legit »

hey all,
Sorry to be a baby about this (just need some help getting off the ground) but I was wondering if anyone could give me an example of a ReadFile from the keypad on MX503's. I'd really appreciate it.
heres my CreateFile if that helps:

comPortOpen = CreateFile("COM3", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);

thanks,
- legit

Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

In the code i posted in this topic paste the following code just before CloseHandle line.

Code: Select all

   while (true)
   {
	   ReadFile(hCom,buffer,1,&br,NULL);
	   if (br != 0)
		   printf("%.2x\n",buffer[0]);
   }
It would print out all Characters recieved.

Post Reply