[jcifs] named pipes like with mkfifo
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Thu Jan 24 11:04:22 EST 2002
> -----Original Message-----
> From: Brett.B.Tofel at Dartmouth.EDU [SMTP:Brett.B.Tofel at Dartmouth.EDU]
> Sent: Wednesday, January 23, 2002 3:36 PM
> To: jcifs at lists.samba.org
> Subject: Re: [jcifs] named pipes like with mkfifo
> --- You wrote:
> See the Named Pipes documentation here:
> http://jcifs.samba.org/src/docs/pipes.html. Follow the MS link to their
> API docs and look into Anonymous Named Pipes. They don't work like UNIX
> named pipes though. You have to use a Pipe call and you cannot do stuff
> like redirect IO with '|' in the shell. Also, I bet you 5 beans you
> don't want to use named pipes. You should be using sockets.
> --- end of quote ---
> thanks for the snappy reply. i did read pipes.html from cover to cover and the
> link to the MS API is busted.
> I am pretty sure anonymous pipes are not what i want since they only work with
> related processes.
Ah, yes, you're correct. Anonymous Named Pipes are for child parent communication.
> and here's the problem with sockets: I need any old Windows program that would
> like to take a file for an output source to be tricked into instead writing to a
> pipe so I can read it and do stuff with what it is writing there. Now I still
> hold out hope for tricking the average program into writing to named pipe, but
> how on earth would i get it to write to a socket if all i have is user access to
> the executable?
I think you can do this. As a simple test use the createnp.exe program to create
a local named pipe called 'foo'. I think you can just use the default arguments like:
c:\> createnp \\.\foo
Then specify \\.\pipe\foo or perhaps \\.\foo with the program you're trying to trick and
basically explore this route.
Also, the Named Pipes link in the pipes.html document did change recently but it was
updated. Link through the API docuementation on our site.
You might also try a Win32 programming news group. I don't really know much about
using Named Pipes like this and it really doesn't have anything to do with jCIFS.
More information about the jcifs