0XC00000B2

STATUS_PIPE_CONNECTED (0XC00000B2) — Fix This Pipe Error Now

This error means a named pipe is already connected, blocking your app from reusing it. Here's how to fix it fast.

I know this error is infuriating — your app crashes or hangs, and Windows just yells STATUS_PIPE_CONNECTED (0XC00000B2) at you. Let's kill this pipe problem.

Quick Fix: Close the Leftover Pipe Handle

This error happens when a named pipe is stuck in the connected state — another process didn't close its handle properly. The simplest fix: find that process and kill it.

  1. Open Task Manager (Ctrl+Shift+Esc).
  2. Look for your app's process or any process that uses named pipes (like svchost.exe, sqlservr.exe, or custom services).
  3. Right-click and select End Task.
  4. Restart your app. If it works, you're done.

If the process won't die, use Command Prompt as Admin:

taskkill /f /im yourapp.exe

Replace yourapp.exe with the actual name.

Deeper Fix: Use Handle or Process Explorer

Still stuck? Download Handle from Sysinternals (it's free). Run this command in an admin prompt to find what's holding the pipe:

handle -a | findstr /i "pipe"

Look for the pipe name (usually matches your app's name or a GUID). Note the PID. Then kill it:

taskkill /f /pid [PID]

Why This Works

Named pipes work like phone lines — one process calls, another answers, then hangs up. If a process crashes or forgets to call DisconnectNamedPipe, the pipe stays "connected" in Windows' view. Any new process trying to connect gets 0XC00000B2 because, as far as the OS knows, someone's still on the line. Killing the offender force-closes the handle, resetting the pipe state.

This is especially common with Windows services that use named pipes for inter-process communication. For example, SQL Server's Shared Memory provider uses named pipes — a hung SQL job can leave pipes dangling. I've seen this with custom C# apps too, where a worker thread dies without cleanup.

Less Common Variations of This Issue

1. Anti-virus or security software blocking pipe creation

Some AV tools (like McAfee or Symantec) intercept named pipe calls and can leave pipes in a zombie state. Temporarily disable your AV, reproduce the issue, and re-enable it. If the error disappears, add your app's executable to the AV's exclusion list.

2. Service crashes without cleanup

If your app runs as a Windows service, a crash might leave the pipe open. Check the Windows Event Viewer (Applications and Services Logs > Microsoft > Windows > TaskScheduler) for service crashes. Restart the service entirely:

net stop YourServiceName && net start YourServiceName

3. Pipe name collision

Two apps using the same pipe name? Windows doesn't stop you from creating a pipe, but if the name is identical to an existing connected pipe, you'll get this error. Use unique pipe names — include a GUID or process ID in the name during development.

4. Corrupt installation of app or driver

Rare, but I've seen it with network driver stacks that use named pipes internally. Reinstall the app or update the driver. For Windows 10/11, run sfc /scannow from an admin prompt to check system file integrity.

Prevention: Stop It From Happening Again

You don't want to fight this every week. Here's how to keep pipes clean:

  • In code: Wrap pipe calls in try/finally blocks. Always call DisconnectNamedPipe and CloseHandle in the finally block, even if the app crashes. Example for C++:
    HANDLE hPipe = CreateNamedPipe(...);
    try {
        // use pipe
    } finally {
        DisconnectNamedPipe(hPipe);
        CloseHandle(hPipe);
    }
  • For services: Set a recovery option in Service Properties — restart the service on first and second failure. This auto-cleans pipes.
  • Monitor: Use Performance Monitor (perfmon.msc) with the "Named Pipe" object to watch for stuck pipes. Set an alert when pipe count spikes.
  • Test: Simulate crashes during QA — kill your app mid-operation and verify pipes reset.

That's it. You've now killed the STATUS_PIPE_CONNECTED error and know how to keep it dead. If your app still misbehaves after all this, double-check your pipe's access permissions — a locked-down security descriptor can mimic this error on some Windows builds.

Related Errors in Network & Connectivity
Wi-Fi Network Not Showing Up – What Actually Fixed It Session persistence lost Load Balancer Session Persistence Lost: Fix in 3 Steps Wi-Fi Connected But No Internet: DNS or Gateway Issue? 0X000025ED Fix DNS CNAME collision error 0X000025ED quickly

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.