简体   繁体   English

从 Winapi 中的命名 pipe 读取行

[英]Read lines from named pipe in Winapi

I am creating a named pipe connection between a .NET C# server app and a Win32 client app.我正在 .NET C# 服务器应用程序和 Win32 客户端应用程序之间创建一个名为 pipe 的连接。 In .NET C# it is possible to create a System.IO.StreamReader object from named pipe server/client stream. In .NET C# it is possible to create a System.IO.StreamReader object from named pipe server/client stream. Is anything similar available in Winapi to read from named pipe line by line?? Winapi 中是否有类似的东西可以逐行从命名的 pipe 读取?

Named pipes are special files, as such you read from them using the file IO API, namely ReadFile , etc.命名管道是特殊文件,因此您可以使用文件 IO API 读取它们,即ReadFile等。

The MSDN has a complete example for opening and reading from a named pipe. MSDN 有一个完整的示例,用于打开和读取名为 pipe 的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM