Call to CoCreateInstance (in C++) loads AcVBA.arx

By Augusto Goncalves

This is as designed. COM DLLs made in VB query for the IMSOComponentManager service on the STA message filter and this query is satisfied by loading VBA.

For instance: an ARX module that calls CoCreateInstance to instantiate VB-based COM class, when the code was executed, AutoCAD will try to initialize its VBA sub system. On this scenario, AutoCAD fails to initalize its VBA sub-system and the exception it thrown killing the CoCreateInstance function call. In fact, the system is trying to locate "acvba.arx" and eventually threw an ole error if it was not found.

So currently, the only work around available is not to use VB to build components if we do not want this dependency.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading