Re: Access named pipe in Windows XP
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Access named pipe in Windows XP

From: David Gravereaux <davygrvy@pobox.com>
Date: Fri Dec 30 2005 - 23:43:53 CET

On Fri, 30 Dec 2005 11:41:44 -0500, "Jim" <donotreply@nowhere.com>
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 :)
Received on Tue Jan 3 03:09:52 2006