Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Whilest using the function ReadFile(??), for getting data from a serial port, how do you specify that the data you want should be only in binary form, (pure data), and not hex or unsigned char?

Thanks in advance
Posted
Updated 16-Nov-10 22:10pm
v2
Comments
Dalek Dave 17-Nov-10 4:10am    
Edited for Grammar.

You don't need to specify anything: ReadFile does read raw binary data.
If you get 'hex' (i.e. the hexadecimal -textual- representation of the data) it just means the other side is sending you that.
:)
 
Share this answer
 
v2
Thanks, great answer too. I was using an unsigned char as its buffer so I think I can use an LPVOID buffer [?] instead and see if things change but I believe you are correct!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900