说你有“方法”
int Read(...)
{
unsigned char Byte = 0;
if(!ReadFile(.., &byte, 1,...))
return -1;
return Byte;
}
int ReadBlock(LPWSTR buffer, int cchBuffer ...)
{
int c = 0;
int cnt = 0;
do
{
if( (c=Read(...)) != -1 )
buffer[num++] = c; // Here.
} while( num < ccBuffer );
return cnt;
}
将 int 正确获取到 WCHAR 的正确方法是什么?