Writing mulitple times in a special (given) pipe C++

╄→尐↘猪︶ㄣ 提交于 2019-12-23 05:20:23

问题


I try to handle some pipes in a CAD Programm with c++. The programm Geograf has two pipes. They are both in the following path: \.\pipe\GGPIPE The interesting on this pipe is, that I have to open a pipe then close a pipe and open a pipe again. After this steps, I can send commands through the pipe to Geograf.

My problem or question is, why I can write to pipe the only one time? After I excecute my program the second time, the handle have a INVALID_HANDLE_VALUE.

If I want to send a command again, I have to restart the Geograf programm (and with it, the GGPIPE). After a restart I can send only one command throgh the pipe.

When I write to another given pipe in windows, I can write multiple times.

Is there a way to write multiple times in the GGPIPE? Or can i manipulate a given pipe?

来源:https://stackoverflow.com/questions/35633393/writing-mulitple-times-in-a-special-given-pipe-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!