0X00040000

OLE_S_USEREG (0X00040000) Fix: Registry COM Lookup

Database Errors Intermediate 👁 2 views 📅 May 28, 2026

OLE_S_USEREG means COM+ is falling back to the registry because a configured COM server isn't found. The fix is usually re-registering DLLs or fixing broken registry paths.

What's Actually Happening with OLE_S_USEREG

You're seeing OLE_S_USEREG (0X00040000) when a COM+ application or DCOM component fails to launch its configured server. The error code itself isn't a failure — it's a success code with a flag: "I used the registry instead of the COM+ catalog." That sounds harmless, but it usually means your COM+ application's configured server executable or DLL isn't registered correctly, so COM+ can't instantiate it from the component services database. It falls back to the raw registry, which may not have the right CLSID or InProcServer32 path.

I've seen this most often on Windows Server 2012 R2 and 2016 after patching or restoring from backup. The COM+ catalog gets corrupted or a re-registered DLL misses its AppID entry. The real trigger is a mismatch between the COM+ catalog (in %windir%\Registration) and the HKEY_CLASSES_ROOT\CLSID hive.

Cause #1: Corrupted or Missing COM+ Catalog Registration

This is the most common culprit. Your COM+ application references a CLSID that exists in the COM+ catalog but the corresponding InProcServer32 or LocalServer32 registry key is missing, wrong bitness, or points to a deleted file.

The Fix: Re-register the COM Component

  1. Open an elevated Command Prompt (Run as Administrator).
  2. For in-process DLLs, run regsvr32 /i "C:\path\to\your\component.dll". The /i switch re-initializes the COM+ subscription. Don't skip it.
  3. For out-of-process EXEs, run "C:\path\to\your\component.exe" -RegServer or -regserver (check vendor docs — most use -RegServer).
  4. After the registration completes, restart the COM+ application from the Component Services MMC (comexp.msc).

The reason step 3 works: -RegServer writes the AppID and CLSID registry keys with the correct path. If you only run regsvr32 on a DLL that ships with an EXE, the EXE's activation path stays broken. I've fixed dozens of cases where a vendor's installer forgot to run -RegServer on the .exe companion.

Cause #2: Bitness Mismatch Between COM+ App and Component

A 64-bit COM+ application can't load 32-bit DLLs directly, and vice versa. OLE_S_USEREG pops up when COM+ tries to load the wrong bitness version. This happens more than you'd think — especially on Server 2016 where the default COM+ app is 64-bit but your vendor shipped a 32-bit DLL.

The Fix: Force the Correct Bitness

  1. Open Component Services MMC.
  2. Navigate to Component Services > Computers > My Computer > COM+ Applications.
  3. Right-click your problem application, select Properties.
  4. Go to the Activation tab — look at the Application Root Directory and Application Type.
  5. If it's a server application, note the path. Navigate to that executable.
  6. Use CorFlags.exe (from Windows SDK) to check bitness: corflags.exe "C:\path\to\your.exe". Look for 32BIT flag. If 32BIT = 1, it's 32-bit.
  7. If the component is 32-bit but your COM+ app is configured for 64-bit, you have two options:
  • Option A: Change the COM+ app to run as a 32-bit process. In the application's Properties > Advanced tab, check Enable 32-bit Process on 64-bit Computer. This forces the surrogate process (dllhost.exe) to run in WOW64.
  • Option B: If you can't change the app, recompile the DLL for the correct bitness.

What's actually happening here: The COM+ catalog stores the desired bitness per application. When it tries to activate a component, it first checks the catalog, finds the CLSID, then looks up the InProcServer32 key. If the key points to a 32-bit DLL but the host process is 64-bit, loading fails silently (or returns OLE_S_USEREG after falling back). The registry fallback succeeds only if the 32-bit CLSID exists in the registry — but then the bitness mismatch still kills activation. You'll see the error in the event log under Windows Components > Application-Experience > Program-Compatibility-Assistant.

Cause #3: Stale or Orphaned COM+ Application Reference in Registry

Sometimes you've uninstalled an application, but the COM+ catalog still references its CLSID. Or a system restore left zombie entries. The error appears when some other code (like a scheduled task or WMI script) tries to create the object — COM+ can't find the configured server, falls back to registry, and the registry key is also missing or malformed.

The Fix: Clean Up the COM+ Catalog

  1. Open an elevated PowerShell (Run as Administrator).
  2. List all COM+ applications: Get-WmiObject -Namespace root\CIMV2 -Class Win32_COMApplication | Select-Object Name, AppID.
  3. Find the offending application by matching the AppID from the error message or the CLSID referenced in the failing component.
  4. Export the application: Export-COMSettings -ApplicationName "YourApp" -FilePath "C:\backup\YourApp.comreg" (this uses the PowershellCom module — install it with Install-Module -Name PowershellCom -Force if needed).
  5. Delete the application: Remove-WmiObject -Namespace root\CIMV2 -Class Win32_COMApplication -Filter "Name='YourApp'".
  6. Re-import the clean application: Import-COMSettings -FilePath "C:\backup\YourApp.comreg".

Skip the above if you don't need the COM+ app — just delete it outright. The reason this works: deleting the COM+ application removes its catalog entries. When you re-import (or re-register the components), the registry keys get written fresh, without stale file paths or orphaned AppID references. I've seen a single zombie application tank an entire line of business app because its CLSID was still in the catalog even though the DLL was gone.

Quick-Reference Summary Table

Cause Symptom Fix Time to Fix
COM+ catalog missing registry entries Error on any activation attempt regsvr32 /i or -RegServer 5 minutes
Bitness mismatch Error on 64-bit system with 32-bit DLL Enable 32-bit process or recompile 10 minutes
Stale COM+ app in catalog Error after uninstall/restore Delete and re-create COM+ app 15 minutes

If none of these solve it, check the application event log for a preceding error from Microsoft-Windows-DistributedCOM with Event ID 10010. That event gives you the exact CLSID and AppID — paste them into Regedit and look under HKEY_CLASSES_ROOT\CLSID\{CLSID} and HKEY_CLASSES_ROOT\AppID\{AppID}. If either is missing, that's your root cause. Don't waste time poking at COM+ permissions unless you see a 0x80070005 (access denied) code alongside OLE_S_USEREG — they're unrelated.

Was this solution helpful?