Fix COMADMIN_E_COMPFILE_CLASSNOTAVAIL (0X80110427)
COM+ can't register your DLL because the class IDs inside the type library don't match what the DLL actually exports. Here's the real fix.
This error is a mismatch between the DLL and its TypeLib
You see this when trying to add a COM+ application or register a DLL in Component Services. The exact message is "The DLL does not support the components listed in the TypeLib." It's not a permissions problem or a missing file. What's actually happening here is COM+ reads the type library embedded in your DLL, finds a list of classes, but when it tries to instantiate or query those classes, the DLL says "nope, don't have that."
The real fix: rebuild the DLL with matching class IDs
- Open your project in Visual Studio (2019 or 2022 works).
- Go to the .idl or .rgs file that defines your coclass. Make sure every
coclassentry has a matching implementation class in your code. Example:
// In your .idl: coclass MyComponent { [default] interface IMyComponent; }; // In your .cpp or .h: class ATL_NO_VTABLE CMyComponent : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CMyComponent, &CLSID_MyComponent>, public IMyComponent { ... }; - Regenerate the type library. Right-click the .idl file in Solution Explorer, choose "Compile."
- Rebuild the entire project: Build > Rebuild Solution.
- Re-register the DLL: open an admin Command Prompt, run
regsvr32 path\to\your.dll. Do not use the 64-bit regsvr32 if your DLL is 32-bit, and vice versa. - Now try adding it to COM+ again.
Why this works
The error 0X80110427 happens because COM+ calls DllGetClassObject for each class listed in the type library. If the DLL returns CLASS_E_CLASSNOTAVAILABLE for any of them, you get this error. The fix forces the type library and the actual class map to agree. The reason step 3 (recompiling the .idl) is critical: Visual Studio sometimes caches old type library data. You need to force it to regenerate the .tlb file.
Less common variations
Sometimes the problem isn't your code. Here are other scenarios:
- Corrupted COM+ catalog. If you restored a backup of the COM+ catalog, CLSIDs can drift. Open Component Services, right-click "COM+ Applications," choose "Properties," then "Advanced." Click "Default impersonation level" and set to "Impersonate." Then reboot. This forces a catalog refresh.
- Wrong bitness. A 32-bit DLL cannot register in a 64-bit COM+ application. Create a 32-bit COM+ application instead. In Component Services, right-click "COM+ Applications," choose "New" > "Application," then "Create an empty application." Set the "Activation type" to "Server application" and check "32-bit only."
- Antivirus blocking registration. Some AV software intercepts
regsvr32and returns incomplete results. Temporarily disable AV, run registration, then re-enable. If that fixes it, add an exception for your DLL. - Missing dependencies. The DLL might load fine but fail when COM+ calls into it because a dependency DLL (like a VC++ runtime) isn't on the system. Run
Dependency Walker(depends.exe) on your DLL to find missing modules.
Prevention going forward
Once you have it working, do three things:
- Version your type library. Each time you change the interface, update the library block's version number in your .idl. This prevents COM+ from caching stale data.
library MyLibrary { importlib("stdole2.tlb"); [version(2.0)] ... } - Use a build event to re-register automatically. In Visual Studio, go to Project Properties > Build Events > Post-build event. Add:
"$(DevEnvDir)..\..\VC\redist\x86\Microsoft.VC142.CRT\regsvr32" /s "$(TargetPath)". Adjust the CRT version as needed. This catches mismatches early. - Test with a minimal COM+ application first. Create a new COM+ app with just your DLL. If it works, the problem is in your existing COM+ configuration, not your code. Add components one by one until the error reappears.
A final note: if you're using WiX or InstallShield, ensure your installer calls
regsvr32with the correct bitness. I've seen this error because the installer registered a 64-bit DLL into a 32-bit COM+ app. The error code is the same, but the root cause is installer logic, not code.
Was this solution helpful?