Reading files using Windows API

Posted by Eli Polonsky on Stack Overflow See other posts from Stack Overflow or by Eli Polonsky
Published on 2011-03-11T15:57:09Z Indexed on 2011/03/11 16:10 UTC
Read the original article Hit count: 290

Filed under:
|
|

Hi

I'm trying to write a console program that reads characters from a file. i want it to be able to read from a Unicode file as well as an ANSI one.

how should i address this issue? do i need to programatically distinguish the type of file and read acoordingly? or can i somehow use the windows API data types like TCHAR and stuff like that.

The only differnce between reading from the files is that in Unicode i have to read 2 bytes for a character and in ASNSI its 1 byte?

im a little lost with this windows API. would appretiate any help thanks

© Stack Overflow or respective owner

Related posts about c

    Related posts about Windows