quote:
Originally posted by enoid
An other idea would be to create the PlusWnd with MsgPlus and pass the Object/ptr/handle to the DLL, but... same story.
This is the simplest way to do it that I could find.
Javascript code:
var TestWnd = MsgPlus.CreateWnd("TestWnd.xml", "TestWnd");
Interop.Call(DllPath, "TestWindow", TestWnd);
C++ code:
void __stdcall TestWindow(IDispatchPtr dispPlusWnd)
{
_IMPPlusWndPtr pPlusWnd;
acquireInterfacePtr(dispPlusWnd, pPlusWnd);
pPlusWnd->SetControlText("EditTest", "Hello, World!");
}
The other way should be possible, but I don't think you can return IDispatch pointers directly with Interop.Call. You should be able to create a DataBloc and write the IDispatch* to that then use DataBloc.ReadInterfacePtr to get the object back, but the above way is much easier