CallNamedPipe function kernel32

bool CallNamedPipe(
  1. PCWSTR lpNamedPipeName,
  2. Pointer<NativeType>? lpInBuffer,
  3. int nInBufferSize,
  4. Pointer<NativeType>? lpOutBuffer,
  5. int nOutBufferSize,
  6. Pointer<Uint32> lpBytesRead,
  7. int nTimeOut,
)

Connects to a message-type pipe (and waits if an instance of the pipe is not available), writes to and reads from the pipe, and then closes the pipe.

To learn more, see learn.microsoft.com/windows/win32/api/namedpipeapi/nf-namedpipeapi-callnamedpipew.

Implementation

@pragma('vm:prefer-inline')
bool CallNamedPipe(
  PCWSTR lpNamedPipeName,
  Pointer? lpInBuffer,
  int nInBufferSize,
  Pointer? lpOutBuffer,
  int nOutBufferSize,
  Pointer<Uint32> lpBytesRead,
  int nTimeOut,
) =>
    _CallNamedPipe(
      lpNamedPipeName,
      lpInBuffer ?? nullptr,
      nInBufferSize,
      lpOutBuffer ?? nullptr,
      nOutBufferSize,
      lpBytesRead,
      nTimeOut,
    ) !=
    FALSE;