I've tested it with FileMode.Create and FileMode.CreateNew, but no one workes!
I think the problem lies in the Pipe path ("\\\\.\\pipe\\..."). The path is not a usually know "File Path". Using System.IO.DirectoryInfo returnes named Pipes of your System...
Perhaps someone gets an idea...
System.IO.DirectoryInfo di = new
FileInfo afi = di.GetFiles();
foreach( FileInfo fi in afi )
Console.WriteLine( fi.ToString() );
>Assuming that the name of the file was \\name:
>Make sure that the file is already created. FileMode.Truncate will >only open an existing file. If not, filenotfound exception is >thrown. Try using something like FileMode.Open or >FileMode.Append.
>I hope that works.