Home › Forums › General XMetaL Discussion › Interacting with running XMAX › Reply To: Interacting with running XMAX
Reply to: Interacting with running XMAX
July 11, 2011 at 9:49 pm…should I create some public plugin methods which will be called within macros and transfer handles to objects like ActiveDocument?
I mean something like
STDMETHODIMP CMyPlugin::AttachActiveDoc (IDispatch* pDoc);
Yes, I suspect so. But beware that holding a reference to ActiveDocument introduces a possible reference cycle (i.e. A refs B and B refs A) that would prevent your container application from shutting down.
HTH
Addam