i have use this function but
ReadFile(hComm, &chRead, 1, &dwRead, NULL)

chRead does not contain Hex value.

how is chRead declared? What do you expect it to contain? an unsigned char can only hold the integer values between 0 and 255, or the hex values between 0 and 0xff. decimal values can be easily converted to hex.

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.