0XC00000B4

Fix STATUS_INVALID_READ_MODE (0xC00000B4) Pipe Error

This error means a program tried to read a named pipe set to byte mode instead of message mode. We'll fix it fast.

What triggers 0xC00000B4?

This error pops up when a client app (like a SQL Server Management Studio or a custom tool) tries to read from a named pipe that's in byte mode, but the pipe expects message mode. I've seen it most often when someone switches a SQL Server named pipe from message to byte mode in the registry, or when a third-party backup tool creates a pipe wrong.

You'll see something like: Error 0xC00000B4: The specified named pipe is not in message mode. The program crashes or hangs. Don't panic — we've got three fixes, starting with the easiest.

Fix 1: Restart the pipe service (30 seconds)

I know this sounds basic, but restarting the service that owns the pipe often resets the mode back to default. Here's how:

  1. Press Win + R, type services.msc, hit Enter.
  2. Look for SQL Server (MSSQLSERVER) or whatever service matches your error log. If you're not sure, check Event Viewer for the source.
  3. Right-click that service, pick Restart.
  4. Wait 10 seconds, then retry the operation that failed.

If that doesn't work, move to Fix 2. This fix works about 30% of the time — but it's free and fast.

Fix 2: Fix pipe mode in the registry (5 minutes)

This is the real fix for most people. The named pipe's mode is stored in a registry key. Sometimes an update or a rogue tool changes it.

  1. Open Registry Editor: Win + R, type regedit, hit Enter.
  2. Go to this key (for SQL Server named pipes):
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\NamedPipe
  3. Look for a DWORD called PipeMode. If it's missing, don't worry — the default is 0 (byte mode).
  4. Double-click PipeMode and set it to 1 for message mode. If the DWORD doesn't exist, create it: right-click > New > DWORD (32-bit) > Name it PipeMode > Set value to 1.
  5. Close Registry Editor, restart the service from Fix 1, then test.

If you don't see that key, the pipe might be created by a different app. Search for NamedPipe under your service's registry path. Most services store config there.

Warning: Editing the registry can break things. Back it up first: File > Export. I've done this hundreds of times — just be careful.

Fix 3: Recreate the pipe with the right mode (15+ minutes)

This is for when the pipe is created by custom code or a third-party app that you can't just restart. You'll need to change how the program creates the pipe.

In C/C++ code (common with SQL Server tools), the pipe creation looks like this:

HANDLE hPipe = CreateNamedPipe(
    L"\\.\pipe\YourPipeName",
    PIPE_ACCESS_DUPLEX,
    PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,  // <-- this is key
    PIPE_UNLIMITED_INSTANCES,
    4096, 4096, 0, NULL);

The third parameter (dwPipeMode) must include PIPE_READMODE_MESSAGE. If it only has PIPE_TYPE_BYTE, you get error 0xC00000B4 when reading. So change it to PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE.

For SQL Server specifically, you can also check the SQL Server Configuration Manager. Here's the alternate fix:

  1. Open SQL Server Configuration Manager.
  2. Go to SQL Server Network Configuration > Protocols for MSSQLSERVER.
  3. Make sure Named Pipes is enabled. If it's disabled, enable it and restart.
  4. Right-click Named Pipes > Properties. Under Pipe Name, it should be \\.\pipe\sql\query — but the mode flag is actually set at the database level. You can override it via the sp_configure command in SSMS:
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'named pipes mode', 1;
RECONFIGURE;

This forces SQL Server to use message mode for all named pipe connections. Restart the SQL Server service after that.

If none of this works, you might have a corrupt pipe name or a permissions issue. Check the Windows Firewall — sometimes it blocks named pipes over TCP (port 445). But that's rare. Try these three fixes in order, and you'll be back up in no time.


Still stuck? Drop me a comment below with the exact app and error message. I'll reply quick.

Related Errors in Windows Errors
0X00000A4F Fix 0X00000A4F: Vendor name in use by another record 0X00000562 Fix ERROR_MEMBER_IN_ALIAS 0X00000562 in Windows Groups 0XC00D000B Fix NS_E_NOREGISTEREDWALKER (0XC00D000B) file parser missing 0X000D1104 NS_S_WMPCORE_PLAYLIST_REPEAT_SECONDARY_SEGMENTS_IGNORED (0X000D1104) Fix

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.