有没有一种简单的方法来测试你的命名管道是否工作正常?我想要确保我从我的应用程序发送的数据是真的在发送。有没有一种快速简单的方法来获得所有命名管道的列表?
发布于 2008-11-03 14:39:49
您可以在sysinternals中使用Process Explorer查看这些内容。使用"Find -> Find Handle or DLL...“选项,然后输入模式"\Device\NamedPipe\“。它将显示哪些进程打开了哪些管道。
发布于 2012-08-22 12:44:28
在Windows Powershell控制台中,键入
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
如果您的操作系统版本高于Windows 7,您还可以输入
get-childitem \\.\pipe\
这将返回一个对象列表。如果您只想要名称:
(get-childitem \\.\pipe\).FullName
(第二个示例\\.\pipe\
在PowerShell7中不起作用,但第一个示例起作用)
发布于 2010-11-23 10:13:19
请尝试执行以下操作:
String[] listOfPipes = System.IO.Directory.GetFiles(@"\\.\pipe\");
https://stackoverflow.com/questions/258701
复制相似问题