ReadConsoleW()
特定のバイト数を読み取った後に戻ることを期待しています。でも返ってこない。
ReadConsoleW()
指定されたバイト数の読み取りが終了したらすぐに戻るにはどうすればよいですか?
私が試したコードは次のとおりです。
#include <stdio.h>
#include <Windows.h>
int main()
{
//something is being written to stdin.
Sleep(2000);
int b;
int r;
//read 3 wide character
ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), &b, 3*sizeof(TCHAR), (LPDWORD)&r, NULL);
//problem: no returns until enter pressed
putc(b,stdout);
while(1)
{};
}