0X80010010

RPC_E_INVALID_PARAMETER (0x80010010) Fix: COM Marshaling

Server & Cloud Intermediate 👁 8 views 📅 May 27, 2026

This COM error hits when RPC can't marshal a parameter. The quick fix: check interface definition alignment and proxy/stub registration.

You stare at 0x80010010 wondering why COM suddenly can't cross process boundaries. I've been there. Let's cut to the fix.

The Fix: Rebuild and Re-register the Proxy/Stub

  1. Find your proxy/stub project. In Visual Studio, look for the project that compiles the IDL file — typically named xxxPS.dll or xxx_p.dll. Open its dlldata.c and check that all your interfaces are listed in the CStdStubBuffer_AddRef calls.
  2. Rebuild in Release mode for the correct architecture. If your client is 64-bit and server is 32-bit (or vice versa), you need a 64-bit proxy. Run midl.exe /Oicf yourfile.idl to regenerate the C files, then compile with cl.exe /LD dlldata.c yourfile_i.c yourfile_p.c /FeProxyStub.dll /link /DLL /MACHINE:X64 (adjust architecture).
  3. Register the new DLL with regsvr32 ProxyStub.dll. Run as admin. Check that registration returns success.
  4. Test your cross-process call again. The error should vanish.

The reason step 3 works: COM uses the proxy/stub DLL to serialize parameters into a format RPC can transmit. If that DLL is missing, misaligned, or uses a different interface GUID, marshaling fails with this exact code. What's actually happening here is the marshaling engine can't find a valid proxy for one of your parameters — usually a custom interface or a complex struct.

Why This Happens: The Real Cause

0x80010010 doesn't mean your parameter is invalid in the C++ sense — it means COM's serialization engine can't convert it into a wire format. Three things go wrong most often:

  • Interface misalignment: The client and server have different interface definitions. Check that both sides compile from the same IDL file. Even a GUID mismatch in one method parameter breaks everything.
  • Missing proxy/stub: For custom interfaces, COM doesn't have built-in marshaling like it does for IDispatch or standard interfaces. You must provide a proxy DLL.
  • Proxy architecture mismatch: A 64-bit client talking to a 32-bit server needs a 64-bit proxy DLL. Windows won't warn you — it just fails.

Less Common Variations

Sometimes the fix isn't a rebuild. I've seen these edge cases:

SymptomReal CauseFix
Error only on one machineCorrupted registry entries for the interface proxy (e.g., after a partial uninstall).Use OleView.exe from the Windows SDK — check under "Automation Objects" that your interface GUID maps to the correct proxy CLSID. Run regsvr32 /u then re-register.
Error with IDispatch-based interfacesYour IDispatch implementation returns a type library that doesn't match the actual interfaces — marshaling defaults to typelib-based, which can fail if the typelib is stale.Recompile the typelib (midl /tlb yourfile.tlb) and ensure LoadTypeLib on the client finds the latest version.
Error only with SAFEARRAY or VARIANT parametersYou're passing a variant that contains a pointer to an unregistered interface inside a SAFEARRAY — nested marshaling fails.Flatten the data: pass simple types or register the contained interface's proxy.

One real-world scenario: a custom .NET COM-callable wrapper (CCW) exposing a List — the List gets marshaled as a SAFEARRAY of VARIANTs, but each VARIANT contains an IMyInterface pointer. If that interface isn't registered for marshaling, 0x80010010 appears. The fix: switch to ArrayList and ensure IMyInterface is registered.

Prevention: Lock Down Your Build Pipeline

Skip the pain next time:

  • Keep one IDL file — commit it to version control. Never hand-edit generated _i.c or _p.c files.
  • Automate proxy registration in your CI/CD pipeline. After every build, run regsvr32 on the proxy DLL. Catch mismatches early.
  • Use midl /Oicf always — the old midl /Oic generates buggy stubs with some complex parameters. I've seen it cause this exact error on Windows Server 2019.
  • Test cross-architecture if your stack is mixed. Spin up a 32-bit test client on a 64-bit machine early in development.

Was this solution helpful?