[Box Backup-dev] Exception thrown in bbackupquery when reading
form stdin
Mark
boxbackup-dev@fluffy.co.uk
Thu, 23 Feb 2006 22:31:06 +0100
Chris Wilson wrote:
> This code is there for a reason: standard read() cannot read unicode
> characters on the input (returns zero), so it would be impossible to
> enter a unicode filename in unicode mode without this code.
>
> I would expect _fileno(stdin) to return zero, and mFileHandle to be
> zero as well, so that we call console_read, which should work.
>
> Could you look into why console_read is not working on your platform?
> Thanks!
>
> Cheers, Chris.
Hi Chris,
The function ReadConsoleW(...) in emu.cpp on line 1207 returns error
code 8. The code snippet where it goes wrong is:
if (!ReadConsoleW(
hConsole,
pWideBuffer,
WideSize - 1,
&numCharsRead,
NULL // reserved
))
{
::fprintf(stderr, "Failed to read from console: error %d\n",
GetLastError());
return -1;
}
hConsole = 3
WideSize = 0
numCharsRead = 0
Do you know what is wrong?
Mark