I have a c++ console application which has an option to be interrupted by pressing any key (implemented by using kbhit()) and in that case it prints what it has done and exits (or can be left to finish the work(some recording) and still prints feedback). I am making a c# gui application for that console application (I m calling exe file from c# form) and instead of pressing any key on the keyboard, I am using a "stop" button which sends Environment.NewLine (or " ") to the redirected input and in the c++ application I now have to use something different from kbhit() for it to work. I tried using cin.get(), like:
if (kbhit() || (cin.get() > 0))
stop_recording=true;
但是,植被(植被)是一种阻挡功能,如果我希望奥果申请能够最终结束,那么它就在不要求停地纽托克的情况下获得了关闭。 是否有任何功能类似于实际上是阻塞性的植物,或者可能采取不同的方式将“任何关键”从c#到我的青ole应用过程?