Hi all,
I am receiving the keyboard read/Terminate command from the client(PC) to the Board(Windows CE) through Serial Interface. I need to terminate the character reading from Keyboard if i receive Terminate Command. Termination/Continuation is been handled inside a thread. But whenever Terminate Command comes Character reads are continuing till the EOF(Enter from keyboard), which is not desired output.
Please provide help.
Reference Code which is inside my thread.
// From main
switch(command)
{
case 'read_keyboard': createthread(....)
break;
case stop read: s_terminatecode =0;
break;
}
// keyboard Read
DWORD WINAPI ReadKeyboard( LPVOID lpParam )
{
while(CliProtocol::s_TerminateCode)
{
ch = getchar();
}
}