I am trying to inject open source COM code in my code (I canβt use COM access without registering through the application manifest, since it works only at exe level): I create a static class that loads the COM COM library, calls DllGetClassObject, then IClassFactory :: CreateInstance ().
Works great. Implementation details are at http://www.dimastr.com/redemption/security.htm#redemptionloader
But if I create an instance of a COM object from several threads (for example, first in the main thread, then from the secondary), Net starts asking for my objects for IMarshal, which I do not implement.
If the COM library is registered in the registry, everything works fine. If the library is not registered in the registry (which is the whole point of doign all this), Net asks IMarshal.
Is there any way to get the standard IMarshal implementation that COM uses internally? Or prevent it from crashes if my object does not implement IMarshal?
Thanks!
source share