Error Pipe Not Connected 233 (0xE9): How to Fix it
Adjusting your code is the only way to fix this issue
2 min. read
Published on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
ERROR_PIPE_NOT_CONNECTED is a developer error, and it’s often followed by 233 (0xE9) No process is on the other end of the pipe message. If you ever encounter it, this guide will show you a few ways to fix it.
How can I fix ERROR_PIPE_NOT_CONNECTED?
1. Adjust your code
- Open your code.
- Ensure that there’s PIPE_NOWAIT available in your code.
- Use it like this:
DWORD mode = PIPE_NOWAIT;
SetNamedPipeHandleState(_callstackPipe,&mode,NULL,NULL);
ConnectNamedPipe(_callstackPipe,NULL);
mode = PIPE_WAIT;
SetNamedPipeHandleState(_callstackPipe,&mode,NULL,NULL); - Save changes.
2. Use ConnectNamePipe
- Analyze your code.
- If you ever get ERROR_PIPE_NOT_CONNECTED in ReadFile it means that the remote end call has disconnected.
- If that’s the case, you can use ConnectNamedPipe without DisconnectNamedPipe.
3. Use listener thread after ConnectNamedPipe()
- Open your code.
- Adjust it so that you’re using a listener thread to wait for the next client like this:
Main Thread
{
CreateListenerThread();
WaitForQuitEvent();
}
ListenerThread
{
ConnectNamedPipe();
if (no error)
{
CreateListenerThread();
if( PeekNamedPipe() has a message )
{
ReadFile();
ProcessReceivedMessage(); // if -quit signal quit event
}
FileFlushBuffers();
DisconnectNamedPipe();
CloseHandle();
}
else
{
// handle/report error
}
} - Save changes.
4. Enable inheritance
- Open your code.
- Add the following line:
BOOL res = SetHandleInformation(hPipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
- Save changes.
This will enable inheritance and hopefully fix the problem.
As mentioned before ERROR_PIPE_NOT_CONNECTED is a developer error, and to fix it, you need to tweak your code accordingly.
This is just one of many pipe errors you can encounter, and we wrote already about Error_Pipe_Busy and Error_Pipe_Local in our previous guides, so don’t miss them.
User forum
0 messages