Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Can I access a named pipe on computer A from computer B given computer A's IP address? If so, what do I need to do to make this happen?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
771 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes you can communicate across the network via named pipes. You specify the pipe name like a UNC path:

\computernamepipepipename

or via IP

\192.168.0.100pipepipename

You can do this for any LAN machine, or for any remote machine connected to your LAN via VPN.

You use all of the same pipe Win32 API functions such as CreateFile. To create the pipe you use CreateNamedPipe.

Before you can use a remote pipe, you must have a valid connection to the remote computer. To do this you would use an API like WNetUseConnection. Or if your computer is on the same domain, or has the same u/p you don't need to use WNetUseConnection at all.

If you are running your program as a service, you cannot access LAN resources with the local system account. The service would have to be configured with another account.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...