[Box Backup-dev] Exception thrown in bbackupquery when reading form stdin

Chris Wilson boxbackup-dev at fluffy.co.uk
Thu Feb 23 21:58:59 GMT 2006


Hi Mark,

>>  Could you look into why console_read is not working on your platform? 
>>  Thanks!
>
> 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?

Yes! You need to modify the preprocessor options to define NDEBUG for all 
projects. Otherwise FdGetLine's buffer is 4 bytes long, which might not be 
enough to hold a single unicode character, so WideSize is zero, and no 
characters can be read.

Please could you submit updated project files for VS2003, since I don't 
have a copy to do this myself?

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |




More information about the Boxbackup-dev mailing list