C++: Implementing Named Pipes using the Win32 API

后端 未结 2 2036
北海茫月
北海茫月 2020-12-25 14:34

I\'m trying to implement named pipes in C++, but either my reader isn\'t reading anything, or my writer isn\'t writing anything (or both). Here\'s my reader:



        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-25 14:50

    You must use CreateNamedPipe() to create the server end of a named pipe. Be sure to specify a non-zero buffer size, zero (documented by MSDN as 'use system default buffer size') doesn't work. MSDN has decent samples for a multi-threaded client&server.

提交回复
热议问题