//指示读线程准备好,可以进行命令输入的信号量
HANDLE m_hEvent;
m_hEvent = NULL; //
m_hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); //start
WaitForSingleObject(m_hEvent, INFINITE); //write command之前 无限时间等待
SetEvent(m_hEvent); //thread中,指示读线程准备好 设置事件为有信号状态
CloseHandle(m_hEvent); //stop
m_hEvent = NULL;
error C1189: #error : "No Target Architecture"
#include <Windows.h>放在头文件就正常了。