Warm tip: This article is reproduced from serverfault.com, please click

Read lines from named pipe in Winapi

发布于 2020-11-29 13:37:22

I am creating a named pipe connection between a .NET C# server app and a Win32 client app. 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??

Questioner
SoumyaMahunt
Viewed
0
Konrad Rudolph 2020-11-29 21:41:08

Named pipes are special files, as such you read from them using the file IO API, namely ReadFile, etc.

The MSDN has a complete example for opening and reading from a named pipe.