如何获取远程服务器上可访问的命名管道列表?
我可以以某种方式从客户端应用程序列出远程服务器上的命名管道吗?
在本地计算机上,我使用
hFindFile = FindFirstFile("\\\\.\\pipe\\*",&fdFileData);
hFindFile 是句柄,fdFileData 是 WIN32_FIND_DATA 结构。我重复调用 FindNextFile(),当它返回 0 时,我使用 FindClose() 关闭。它在本地计算机上运行完美,但是当我尝试调用
hFindFile = FindFirstFile("\\\\servername\\pipe\\*",&fdFileData);
它时,它导致 ERROR_INVALID_FUNCTION。 有人建议我,我需要通过 WNetUseConnection() 连接到远程服务器,但对我来说,不清楚我连接到哪个对象。
can I somehow list named pipes on remote server from a client application?
On local computer I use
hFindFile = FindFirstFile("\\\\.\\pipe\\*",&fdFileData);
where hFindFile is a handle and fdFileData is WIN32_FIND_DATA struct. I call FindNextFile() repeatedly and when it returns 0 I close with FindClose(). It works perfect on local machine, but when I try call
hFindFile = FindFirstFile("\\\\servername\\pipe\\*",&fdFileData);
it resulted to ERROR_INVALID_FUNCTION.
Someone advise me that I need to connect to remote server by WNetUseConnection(), but for me it's not clear what object I have connect to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果另一台机器是 Windows,则通常足以使用 WNetUseConnection() 映射任何驱动器并获得连接到其他资源(即命名管道)所需的凭据。
http://support.microsoft.com/kb/256847
If the other machine is windows, it is often sufficient to map any drive using WNetUseConnection() and gain the credentials you require to connect to other resources (i.e. named pipes).
http://support.microsoft.com/kb/256847