Hello Lorenzo,
understood. So in this case, the marshaling should not be needed and the object access should work. Can you describe what action raises an exception? Is there any context information behind the exception like 32bit error code etc.?
Also, make sure the CoInitialize (or the Ex) is called from the main gui thread.
FYI: Actually, the FreeMASTER code itself proves the multi-threaded access to its own ActiveX object is possible. Its multi-threded JSON-RPC interface uses the ActiveX interface internally to perform the desired operation. In this case, the ActiveX object is created by the TCP/IP listening thread and is marshalled to JSON-RPC worker thread where it is used.
Would it be possible for you to experiment a bit with splitting the object creation and object usage into two different threads and use the interface marshalling calls? As the marshalling calls are ready to handle multi-threaded operations, they could return some useful error codes for us to better understand what is the problem here (instead of when accessing the object just crashes).
Thanks,
Michal