Solved

Named Pipe

Posted on 1998-04-04
4
1,080 Views
Last Modified: 2012-08-13
I am using named pipe mechanism for interproces communication . My server programm cteates
local named pipe with one pipe instance, connects to the pipe and read.  After some timeout  it disconnect from pipe and close pipe handle. . After  disconnecting and closing the pipe handle,
server tries to create pipe with the same name and parameters and connects to it , but GetLastError
back error 231 (All pipe instances are busy. ERROR_PIPE_BUSY). In the client side I connect to the
pipe with CreateFile and write. I never close the pipe handle in the client programm.  What's  wrong in this scenario and what's the rihgt way for using named pipe ?
Yes. I close client pipe handle.
0
Comment
Question by:lilya
4 Comments
 
LVL 2

Expert Comment

by:eelko
ID: 1258002
Shouldn't you close the pipe handle in the client program ?
0
 

Author Comment

by:lilya
ID: 1258003
Edited text of question
0
 
LVL 3

Expert Comment

by:q2guo
ID: 1258004
Hi Lilya

You said in your question:
"I never close the pipe handle in the client program"
"I close client pipe handle. "

I am confused, did you close the client pipe handle before recreating the pipe using the server, or didn't you?
0
 

Accepted Solution

by:
danbala earned 100 total points
ID: 1258005
You have to cloes either the server's read end and the client's write end
or vice-versa! -before reading or writing to the pipe!!!

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now