Unmanaged calls
Should be something like this:
[DllImport("kernel32", EntryPoint="CallNamedPipe", CharSet=CharSet.Auto)]
private static extern bool CallNamedPipe(string lpNamedPipeName,
[MarshalAs(UnmanagedType.AsAny)] object lpInBuffer, int nInBufferSize,
[MarshalAs(UnmanagedType.AsAny)] object lpOutBuffer, int nOutBufferSize,
[In, Out] int[] lpBytesRead, int nTimeOut);
Gabriel Lozano-Morán