internal void ImpersonateClient() { if (!NativePipe.ImpersonateNamedPipeClient(this._handle)) { int errorCode = Marshal.GetLastWin32Error(); throw new RemotingException(string.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Ipc_ImpersonationFailed"), new object[] { GetMessage(errorCode) })); } }
internal void ImpersonateClient() { bool status = NativePipe.ImpersonateNamedPipeClient(_handle); if (!status) { int error = Marshal.GetLastWin32Error(); throw new RemotingException(String.Format(CultureInfo.CurrentCulture, CoreChannel.GetResourceString("Remoting_Ipc_ImpersonationFailed"), GetMessage(error))); } }