31 const HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
32 if (hStdin == INVALID_HANDLE_VALUE)
35 DuplicateHandle(GetCurrentProcess(), hStdin,
36 GetCurrentProcess(), &hStdinDup,
37 0,
false, DUPLICATE_SAME_ACCESS);
42 ok = ReadFile(hStdinDup, chBuf,
sizeof(chBuf), &dwRead, NULL);
43 if (ok && dwRead != 0)
44 emit receivedCommand(QString::fromLocal8Bit(chBuf, dwRead));