GetNamedPipeClientComputerNameA function (winbase.h)

Retrieves the client computer name for the specified named pipe.

Syntax

BOOL GetNamedPipeClientComputerNameA(
  [in]  HANDLE Pipe,
  [out] LPSTR  ClientComputerName,
  [in]  ULONG  ClientComputerNameLength
);

Parameters

[in] Pipe

A handle to an instance of a named pipe. This handle must be created by the CreateNamedPipe function.

[out] ClientComputerName

The computer name.

[in] ClientComputerNameLength

The size of the ClientComputerName buffer, in bytes.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call the GetLastError function.

Remarks

Windows 10, version 1709:  Pipes are only supported within an app-container; ie, from one UWP process to another UWP process that's part of the same app. Also, named pipes must use the syntax \\.\pipe\LOCAL\ for the pipe name.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

CreateNamedPipe

Pipe Functions

Pipes Overview