Discussion:
How to use "(named) pipes" in Windows with BCB6?
(too old to reply)
2004-01-17 15:59:40 UTC
Permalink
How to use "(named) pipes" in Windows with BCB6? And how to do it in Linux?
Thomas Maeder [TeamB]
2004-01-17 17:11:46 UTC
Permalink
Please direct your browser at http://info.borland.com/newsgroups/ and read the
newsgroup guidelines. One of them asks us not to post the same question to
different newsgroups, but to pick the most appropriate one and just post
there. Thanks!

[Followup-To: borland.public.cppbuilder.nativeapi - other participants please
post to that newsgroup only.]
Post by
How to use "(named) pipes" in Windows with BCB6? And how to do it in Linux?
You should be able to use the Posix Standard functions pipe (for creating
unnamed pipes) and mkfifo (for creating named pipes) on both Linux and
Windows. On Linux, you can create a named pipe using the command fifo from
the command line. I don't know of such a command on Windows, but wouldn't
be surprised if it existed.

To be able to use a (unnamed) pipe to communicate between two processes,
you will have to use fork(); this will restrict your possibilities of using
class type objects a lot, I think.

A named pipe is used much like a file.
Detlef
2004-01-19 10:37:18 UTC
Permalink
Hi,
have a look at the Windows Help "Pipe".
There exist the function: CreateNamedPipe
After you have created the pipe, you can write with WriteFile or read with
ReadFile.
One thing : File name should be: \\.\pipe\pipename and don't forget in C++
you need to extend the backslash to "\\" -> \\\\.\\pipe\\pipename.
Detlef
Post by
How to use "(named) pipes" in Windows with BCB6? And how to do it in Linux?
Loading...