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.