Solved

Named Pipe

Posted on 1998-04-04
4
1,086 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

861 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

22 Experts available now in Live!

Get 1:1 Help Now