How do I get the hostname of the server end of a Windows pipe, from a file handle to the client end?

Viewed 99

I want the reverse of WinAPI's GetNamedPipeClientComputerName.

Using WinAPI, preferably. (I'm trying to avoid having to talk to .NET, make expensive system() calls to Powershell, or write all the infrastructure necessary to consume WMI/MI or COM.)

Edit: Yes, I know if I control both ends and it's duplex I can write logic to have the server tell me its hostname. Let's skip that hack.

0 Answers
Related