Hello All,
I found out why the ConnectionPointContainer was failing here as i was calling it on the Word document instead of Application. Once i made those changes it started working. But now, i am not able to attach the sink object with the Connection point. I believe the following code is the culprit
private int QueryInterface(int riid, int ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown)
|| COM.IsEqualGUID(guid, COM.IIDIDispatch)) {
COM.MoveMemory(ppvObject, new int[] { iDispatch.getAddress() }, 4);
AddRef();
return COM.S_OK;
}
COM.MoveMemory(ppvObject, new int[] { 0 }, 4);
return COM.E_NOINTERFACE;
}
Here, the method is returning COM_EN_NOINTERFACE, i don't know why

....any ideas??
thanks,
Niranjan