954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Error 231 ( All Pipe instances are busy)

Hi, I got problem with Interprocess communication in MFC
I am using vs2003

I have got project using named pipes. It seems to be perfect, However, When client want to create the file it always fails

the pseudo code

Server
- Create Named Pipe
- Read File

Client
- Create File
- Write File

the code it self in client side

m_hPipe = CreateFile(ISOCOMSPIPE,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

if(m_hPipe == INVALID_HANDLE_VALUE)
{
int iRet = GetLastError();

if(iRet == ERROR_PIPE_BUSY)
{
if(!WaitNamedPipe(ISOCOMSPIPE,1000))
{
m_hPipe = CreateFile (ISOCOMSPIPE,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

//CHECK ERROR MESSAGE AGAIN
if(m_hPipe == INVALID_HANDLE_VALUE)
{
int iRet = GetLastError();
printf("%s \n",iRet);
return iRet;
}
}

I still got error message 231 which all pipe instances are busy

Any idea how to solve this one. Thanks

arifliminto86
Newbie Poster
9 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

Restart your server application and try to connect again

Hi, I got problem with Interprocess communication in MFC I am using vs2003

I have got project using named pipes. It seems to be perfect, However, When client want to create the file it always fails

the pseudo code

Server - Create Named Pipe - Read File

Client - Create File - Write File

the code it self in client side

m_hPipe = CreateFile(ISOCOMSPIPE,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

if(m_hPipe == INVALID_HANDLE_VALUE) { int iRet = GetLastError(); if(iRet == ERROR_PIPE_BUSY) { if(!WaitNamedPipe(ISOCOMSPIPE,1000)) { m_hPipe = CreateFile (ISOCOMSPIPE,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

//CHECK ERROR MESSAGE AGAIN if(m_hPipe == INVALID_HANDLE_VALUE) { int iRet = GetLastError(); printf("%s \n",iRet); return iRet; } }

I still got error message 231 which all pipe instances are busy

Any idea how to solve this one. Thanks

jangid
Newbie Poster
1 post since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You