N
nectar
Hello;
I've create a COMAddin that I would like to access from another process. I
can access the addin from VBA using:
Set x = Application.COMAddIns.Item("XX.Connect").Object
I'm trying to do the same thing in C# and C++"
From the application the creates Word, I've tried: (C#)
object caddin = app.COMAddIns.Item(ref oo).Object;
XX.IConnect c = caddin as XX.IConnect;
The above cast does not work...
From the application that creates Word, I've tried: (C++)
CComPtr <Office::COMAddIns> addins;
w_app->get_COMAddIns(&addins);
CComPtr <Office::COMAddIn> addin;
addin = addins->Item(&x);
XX::IConnect * p;
CComPtr <XX::IConnect> vr;
addin->get_Object((IDispatch**)&p);
I can connect to the object but the first method I call I get
Unhandled exception at 0x7713fde9 in WordCPP.exe: 0xC0000096:
Privileged instruction.
Can anyone help?
I've create a COMAddin that I would like to access from another process. I
can access the addin from VBA using:
Set x = Application.COMAddIns.Item("XX.Connect").Object
I'm trying to do the same thing in C# and C++"
From the application the creates Word, I've tried: (C#)
object caddin = app.COMAddIns.Item(ref oo).Object;
XX.IConnect c = caddin as XX.IConnect;
The above cast does not work...
From the application that creates Word, I've tried: (C++)
CComPtr <Office::COMAddIns> addins;
w_app->get_COMAddIns(&addins);
CComPtr <Office::COMAddIn> addin;
addin = addins->Item(&x);
XX::IConnect * p;
CComPtr <XX::IConnect> vr;
addin->get_Object((IDispatch**)&p);
I can connect to the object but the first method I call I get
Unhandled exception at 0x7713fde9 in WordCPP.exe: 0xC0000096:
Privileged instruction.
Can anyone help?