Skip to content

COM activation

The SIDRA API is a .NET 8 assembly exposed to COM via .NET COM hosting. Two activation paths are supported.

Registered activation (default)

When SIDRA Intersection is installed, the installer:

  1. Copies SIDRASolutions.SI.API.dll, SIDRASolutions.SI.API.comhost.dll, and SIDRASolutions.SI.API.tlb into the install folder.
  2. Calls regsvr32 SIDRASolutions.SI.API.comhost.dll to register every [Guid]-marked type under HKCR\CLSID.
  3. Registers the type library so Visual Studio's Add COM Reference dialog picks it up.

Client code activates the API by ProgID or CLSID:

var api = (ISIAPI)Activator.CreateInstance(Type.GetTypeFromProgID("SIDRASolutions.SI.API"));
api = win32com.client.Dispatch("SIDRASolutions.SI.API")

Registration-free activation

If you ship the API inside your own application (no full SIDRA Intersection install on the target machine), use registration-free COM via an application manifest. This avoids touching the registry and lets the API live side-by-side with other versions.

Add a manifest next to your .exe:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="SIDRASolutions.SI.API"
          version="1.0.0.0"
          processorArchitecture="amd64" />
    </dependentAssembly>
  </dependency>
</assembly>

The SIDRA Intersection build emits the matching reg-free manifest into the output folder. Copy SIDRASolutions.SI.API.dll, SIDRASolutions.SI.API.comhost.dll, the .manifest files, and the runtime config into your application's bin folder.

32-bit vs 64-bit hosts

The API is x64-only. A 32-bit host process will fail to activate it with REGDB_E_CLASSNOTREG even if registration succeeded. Either:

  • Build your host as x64, or
  • Use an out-of-process surrogate (dllhost.exe x64) by configuring the AppID for the API CLSIDs — not recommended for new code.

Troubleshooting

Error Likely cause
0x80040154 REGDB_E_CLASSNOTREG API not registered, or host is 32-bit
0x8007000B BAD_FORMAT Mixed 32/64-bit; rebuild host as x64
0x80131902 (CLR error) .NET 8 runtime missing on the machine