comdllwinapiregfreecom

Is registration-free activation possible for EXE (out-of-process) COM servers?


I know that we can use CoLoadLibrary and DllGetClassObject to get the IClassFactory interface and get the COM component interface without registering the DLL.

But what about a COM component in an EXE? Is there a way that I can get a COM component interface from an EXE-type COM server by just providing a different file path?


Solution

  • If you use the real registration free COM, you should be able to get this working for both in-proc and out-of-proc COM objects.

    As Sharptooth pointed out, you're really not using registration free COM. Instead you're really rolling your own by faking the calls that COM uses during activation. Your solution CAN work if you control both your application and the COM server you're activating but it's likely to fail otherwise.