Re: Access named pipe in Windows XP



On Fri, 30 Dec 2005 11:41:44 -0500, "Jim" <donotreply@xxxxxxxxxxx>
wrote:

>I know this question came up before, but I don't see a clear answer to it.
>
>I want to write to a named pipe from my script, but the "open" function
>below doesn't seem to work.
>
>set p [open "\\\\.\\Pipe\\my_test_pipe" w]
>
>However, the open function in Perl works just fine:
>open(p, "> \\\\.\\Pipe\\my_test_pipe")
>
>Could anybody shed any light on this?
>
>TIA,
>Jim
>
>

There isn't a channel driver specifically for namedpipes. But there
could be if someone coded one up.

A named pipe is a bidirectional handle, but the pipe channel driver
assumes a pair of unidirectional ones for the anonymous type.

I tried once putting the same handle in both, but there's a double
destroy when you do.

IIRC, there isn't any easy way to determine from the HANDLE what type
of pipe it is.

See win/tclWinChan.c:Tcl_MakeFileChannel(). I don't know if there is
a determinate way to tell the difference between anon and named for
the FILE_TYPE_PIPE case.

Please experiment. Please post patches :)
.



Relevant Pages

  • Access named pipe in Windows XP
    ... I want to write to a named pipe from my script, ... the open function in Perl works just fine: ... Prev by Date: ...
    (comp.lang.tcl)
  • Re: Access named pipe in Windows XP
    ... the open function in Perl works just fine: ... I use a named pipe with w+ and it seems to be the working combination. ... Prev by Date: ...
    (comp.lang.tcl)