TransactNamedPipe function Null safety kernel32

int TransactNamedPipe(
  1. int hNamedPipe,
  2. Pointer<NativeType> lpInBuffer,
  3. int nInBufferSize,
  4. Pointer<NativeType> lpOutBuffer,
  5. int nOutBufferSize,
  6. Pointer<Uint32> lpBytesRead,
  7. Pointer<OVERLAPPED> lpOverlapped
)

Combines the functions that write a message to and read a message from the specified named pipe into a single network operation.

BOOL TransactNamedPipe(
  HANDLE       hNamedPipe,
  LPVOID       lpInBuffer,
  DWORD        nInBufferSize,
  LPVOID       lpOutBuffer,
  DWORD        nOutBufferSize,
  LPDWORD      lpBytesRead,
  LPOVERLAPPED lpOverlapped);

Implementation

int TransactNamedPipe(
    int hNamedPipe,
    Pointer lpInBuffer,
    int nInBufferSize,
    Pointer lpOutBuffer,
    int nOutBufferSize,
    Pointer<Uint32> lpBytesRead,
    Pointer<OVERLAPPED> lpOverlapped) {
  final _TransactNamedPipe = _kernel32.lookupFunction<
      Int32 Function(
          IntPtr hNamedPipe,
          Pointer lpInBuffer,
          Uint32 nInBufferSize,
          Pointer lpOutBuffer,
          Uint32 nOutBufferSize,
          Pointer<Uint32> lpBytesRead,
          Pointer<OVERLAPPED> lpOverlapped),
      int Function(
          int hNamedPipe,
          Pointer lpInBuffer,
          int nInBufferSize,
          Pointer lpOutBuffer,
          int nOutBufferSize,
          Pointer<Uint32> lpBytesRead,
          Pointer<OVERLAPPED> lpOverlapped)>('TransactNamedPipe');
  return _TransactNamedPipe(hNamedPipe, lpInBuffer, nInBufferSize, lpOutBuffer,
      nOutBufferSize, lpBytesRead, lpOverlapped);
}