Custom COM class factory for a managed in-process server

I am looking for an implementation of custom COM activation logic for a managed class library in an MkParseDisplayName/BindToObject image .

Thus, creating an object from VB might look like this:

obj = GetObject("clsid:12341234-1234-1234-1234-123412341234:!UniqueObjectId")

This will not be a problem for the server out of turn (using CoRegisterClassObject). However, for the in-proc server, I will need to change the implementation DllGetClassObjectthat is usually provided mscoree.dll. Is this even possible?

The only other option I see is to create a Single Single Object # object for the factory class and implement IParseDisplayName . Theoretically, such a singleton could also register its own class IClassFactoryc object CoRegisterClassObject(CLSCTX_INPROC_SERVER), but the singleton itself would have to get an instance in the first place. Anyway.

+3
source share

All Articles