Home › Forums › General XMetaL Discussion › Interacting with running XMAX › Reply To: Interacting with running XMAX
Reply to: Interacting with running XMAX
July 8, 2011 at 8:05 pmWhat is the HRESULT on the line that fails? E_NOINTERFACE? If so, then I have to question the code that added the COM interface to the ROT. What does that code look like?
How do you get ahold of an IXMetaLControl interface instance to setup your COleDispatchDriver wrapper? There is no way to obtain that XMAX interface from within the scope of a macro (unless you write some container code to inject it). The top-level COM objects available from within a macro are ActiveDocument and Selection. But, neither of those objects let you get ahold of an IXMetaLControl instance.
BTW, calling methods on the IXMetaLControl interface from with the scope of a macro is ill advised.