CreatePipe function Null safety kernel32
Creates an anonymous pipe, and returns handles to the read and write ends of the pipe.
BOOL CreatePipe(
PHANDLE hReadPipe,
PHANDLE hWritePipe,
LPSECURITY_ATTRIBUTES lpPipeAttributes,
DWORD nSize
);
Implementation
int CreatePipe(Pointer<IntPtr> hReadPipe, Pointer<IntPtr> hWritePipe,
Pointer<SECURITY_ATTRIBUTES> lpPipeAttributes, int nSize) {
final _CreatePipe = _kernel32.lookupFunction<
Int32 Function(Pointer<IntPtr> hReadPipe, Pointer<IntPtr> hWritePipe,
Pointer<SECURITY_ATTRIBUTES> lpPipeAttributes, Uint32 nSize),
int Function(
Pointer<IntPtr> hReadPipe,
Pointer<IntPtr> hWritePipe,
Pointer<SECURITY_ATTRIBUTES> lpPipeAttributes,
int nSize)>('CreatePipe');
return _CreatePipe(hReadPipe, hWritePipe, lpPipeAttributes, nSize);
}