Is there an easy way to test whether your named pipe is working correctly? I want to make sure that the data I'm sending from my app is actually being sent. Is there a quick and easy way to get a list of all the named pipes?
8 Answers
105
votes
You can view these with Process Explorer from sysinternals. Use the "Find -> Find Handle or DLL..." option and enter the pattern "\Device\NamedPipe\". It will show you which processes have which pipes open.
97
votes
57
votes
48
votes
24
votes
9
votes
The second pipe was interpreted by this web site when submitted... You need two backslashes at the beginning. So make sure to use System.IO.Directory.GetFiles(@"\\.\pipe\")
.
Note that I have seen this function call throw an 'illegal characters in path.' exception when one of the pipes on my machine had invalid characters. PipleList.exe worked ok though, so it seems like a bug in MS's .NET code.