File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes General Computing and the fly likes Replacement for Named Pipes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Replacement for Named Pipes" Watch "Replacement for Named Pipes" New topic

Replacement for Named Pipes

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Hopefully a simple question to someone. Does anyone know a quick and painless way to represent named pipes (fr. Unix) in Windows? Thanks.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Actually, Win32 does have something called "named pipes"; there's a CreateNamedPipe() system call! Unfortunately, the semantics are completely different. AFAIK, there's no other native IPC mechanism in Windows that's any closer, either.
I'm not sure, but I think that the Cygwin folks finally got around to implementing UNIX named pipes for Windows. If you're porting UNIX apps to Windows, Cygwin is definitely worth a look.

[Jess in Action][AskingGoodQuestions]
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Thanks for the reply Ernest. I'm familar with the CreateNamedPipe system call but I don't think it will fit into the scenario I've been given. You see we have a Basic routine that is running and writing and reading from 2 pipes that were started on bootup (on a AIX machine). We also have 2 C programs that read from a certain device that read and write to these pipes, respectively, with data either retrieved or going to this device. Currently on the AIX we simply call the C program and since it either reads or writes to the pipes we are fine since the basic program is doing the same (well in reverse order). If I put the CreateNamedPipe into a C or VB or whatever program to generate a pipe will that pipe "stick" around after the program has terminated? Or does this CreateNamedPipe only create a scenario whereby the program it's in has to utilize it there and nowhere else, meaning once the program stops the pipes are closed? I understand pipes in Unix but wasn't sure if things were that much different in Windows. I apologize for the simplistic questioning but pipe interaction is still quite new to me as I haven't spent any time playing with them (this is my first go). Any help would be appreciated. Thanks in advance.
I agree. Here's the link:
subject: Replacement for Named Pipes