Search code examples
c++dllcom

COM dll without DllRegisterServer, etc


I have a COM dll that exports a custom factory function, CreateX(). Much like D3D11, objects from this dll are not instantiated via CoCreateInstance(), and there are no class factories or CLSIDs - only IIDs. I've removed all mention of the server functions from the ATL project, which builds without problems. I also linked the dll to a test application, and everything works as expected.

Is there a downside to excluding DllRegisterServer() (and the like) in this situation that I am not aware of?


Solution

  • There is no apparent downside. It's a popular misconception that all what is COM related has to be in the Windows registry. On the fundamental level COM is just a convention of binary interoperability. Services available through the registry are not necessary.