GetNamedPipeHandleState function Null safety kernel32

int GetNamedPipeHandleState(
  1. int hNamedPipe,
  2. Pointer<Uint32> lpState,
  3. Pointer<Uint32> lpCurInstances,
  4. Pointer<Uint32> lpMaxCollectionCount,
  5. Pointer<Uint32> lpCollectDataTimeout,
  6. Pointer<Utf16> lpUserName,
  7. int nMaxUserNameSize
)

Retrieves information about a specified named pipe. The information returned can vary during the lifetime of an instance of the named pipe.

BOOL GetNamedPipeHandleStateW(
  HANDLE  hNamedPipe,
  LPDWORD lpState,
  LPDWORD lpCurInstances,
  LPDWORD lpMaxCollectionCount,
  LPDWORD lpCollectDataTimeout,
  LPWSTR  lpUserName,
  DWORD   nMaxUserNameSize
);

Implementation

int GetNamedPipeHandleState(
        int hNamedPipe,
        Pointer<Uint32> lpState,
        Pointer<Uint32> lpCurInstances,
        Pointer<Uint32> lpMaxCollectionCount,
        Pointer<Uint32> lpCollectDataTimeout,
        Pointer<Utf16> lpUserName,
        int nMaxUserNameSize) =>
    _GetNamedPipeHandleState(
        hNamedPipe,
        lpState,
        lpCurInstances,
        lpMaxCollectionCount,
        lpCollectDataTimeout,
        lpUserName,
        nMaxUserNameSize);