Using custom COM interfaces without registering - is it possible?

This is a discussion on Using custom COM interfaces without registering - is it possible? within the Windows Programming forums, part of the Platform Specific Boards category; I have a problem with COM DLL's.
I want to create a portable application (entirely in unmanaged C++) which will ...

Using custom COM interfaces without registering - is it possible?

I have a problem with COM DLL's.

I want to create a portable application (entirely in unmanaged C++) which will work of USB drive. Also I need to be sure that the program will run even if current Windows is limited (has no rights to install anything).

The problem is that as far as I know to be able to use such a COM dll, it needs to be registered with regsvr32 but as my app will possibly run in a limited user environment, it seems, I will not be able to register my DLL at the start of the session and unregister it later.

Could you, please, suggest something (I have no time nor skills to rewrite that IAccessible2 dll to be implemented otherwise not as COM, but if could create some wrapper if it will solve the problem)?

There are two solutions I know of - but I can't say that either of them will allow you to use the unregistered COM objects under a strict user account.

What you've already found is definately the easiest method. However, since it uses manifests that solution is only available on XP and up.

The only example I could find for creating an un-registered COM object from a DLL was in VB (and it's not as easy as using manifests). Basically you start with LoadTypeLibEx() to get information on the classes you want to instantiate. Then LoadLibrary() and GetProcAddress("DllGetClassObject"). Then you can call DllGetClassObject() directly to get the IClassFactory interface for the object you want to instantiate.