char SerialGetc(HANDLE *hCom)
{
char rxchar;
BOOL bReadRC;
static DWORD iBytesRead;
bReadRC = ReadFile(*hCom, &rxchar, 1, &iBytesRead, NULL);
if (iBytesRead) return rxchar; else return 0; // return 0 if no character read
}

this is my code to receive data iam having doubt that in what format it can receive data ie in hex or decimal .because i want to check the value which i received and send signal to chip .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.