Quote Originally Posted by Elroy View Post
So, instantiating an object with calls to NewObjectFromActivexDll definitely takes longer than instantiating an object from a class in our project. So, we should try to avoid 1,000s of re-instantiations when using AX.DLLs, especially when using them in this un-registered way.
The only instantiation code you need for new objects is the call to "IClassFactory_CreateInstance". All the rest can be executed only once at the beginning and the results cached in module-level variables. That should substantially speed up subsequent re-instantiations.