예제 #1
0
파일: Spawner.cs 프로젝트: zshell/RedPeanut
        public static bool CreatePipe(ref IntPtr hReadPipe, ref IntPtr hWritePipe)
        {
            var lpPipeAttributes = new Natives.SECURITY_ATTRIBUTES
            {
                nLength              = Marshal.SizeOf(typeof(Natives.SECURITY_ATTRIBUTES)),
                bInheritHandle       = true,
                lpSecurityDescriptor = IntPtr.Zero
            };

            if (!Natives.CreatePipe(out hReadPipe, out hWritePipe, ref lpPipeAttributes, 4089))
            {
                return(false);
            }
            return(true);
        }