I managed to solve this. I had previously generated the registry entries using this command:
regasm TheApplication.dll /regfile:TheApplication.reg
Then I had imported TheApplication.reg into the registry using regedit.
Referring to the regasm documentation here: https://learn.microsoft.com/en-us/dotnet/framework/tools/regasm-exe-assembly-registration-tool
I discovered this: "The /regfile option only emits registry entries for managed classes. This option does not emit TypeLibID or InterfaceID entries."
To get it working, I did the following:
Then I used the following command to register the DLL:
regasm TheApplication.dll /tlb:TheApplication.tlb /codebase