SetNamedPipeHandleState function kernel32
Sets the read mode and the blocking mode of the specified named pipe.
If the specified handle is to the client end of a named pipe and if the named pipe server process is on a remote computer, the function can also be used to control local buffering.
To learn more, see learn.microsoft.com/windows/win32/api/namedpipeapi/nf-namedpipeapi-setnamedpipehandlestate.
Implementation
Win32Result<bool> SetNamedPipeHandleState(
HANDLE hNamedPipe,
Pointer<Uint32>? lpMode,
Pointer<Uint32>? lpMaxCollectionCount,
Pointer<Uint32>? lpCollectDataTimeout,
) {
final result_ = SetNamedPipeHandleState_Wrapper(
hNamedPipe,
lpMode ?? nullptr,
lpMaxCollectionCount ?? nullptr,
lpCollectDataTimeout ?? nullptr,
);
return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}