System.IO.Pipes.Win32AnonymousPipeServer.Win32AnonymousPipeServer C# (CSharp) 메소드

Win32AnonymousPipeServer() 공개 메소드

public Win32AnonymousPipeServer ( AnonymousPipeServerStream owner, PipeDirection direction, HandleInheritability inheritability, int bufferSize ) : System
owner AnonymousPipeServerStream
direction PipeDirection
inheritability HandleInheritability
bufferSize int
리턴 System
		public Win32AnonymousPipeServer (AnonymousPipeServerStream owner, PipeDirection direction, HandleInheritability inheritability, int bufferSize)
		{
			IntPtr r, w;
			SecurityAttributesHack att = new SecurityAttributesHack (inheritability == HandleInheritability.Inheritable);
			if (!Win32Marshal.CreatePipe (out r, out w, ref att, bufferSize))
				throw new Win32Exception (Marshal.GetLastWin32Error ());

			var rh = new SafePipeHandle (r, true);
			var wh = new SafePipeHandle (w, true);

			if (direction == PipeDirection.Out) {
				server_handle = wh;
				client_handle = rh;
			} else {
				server_handle = rh;
				client_handle = wh;
			}
		}

Same methods

Win32AnonymousPipeServer::Win32AnonymousPipeServer ( AnonymousPipeServerStream owner, SafePipeHandle serverHandle, SafePipeHandle clientHandle ) : System