I get a COMException when trying to connect an event...
I've added a reference to the MessengerAPI interface (windows messenger) to my project.
// class definition in the messengerapiCode:private MessengerClass _Messenger = new MessengerClass();
properties and methods are all working fine but when I try to connect an event (any event from this reference) it throws a COMException:
System.Runtime.InteropServices.COMException (0x80040202): Exception from HRESULT: 0x80040202.Code:_Messenger.OnContactBlockChange += new DMessengerEvents_OnContactBlockChangeEventHandler(this.DoContactBlockChange);
at System.Runtime.InteropServices.UCOMIConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
at MessengerAPI.DMessengerEvents_EventProvider.add_OnContactBlockChange(DMessengerEvents_OnContactBlock ChangeEventHandler )
at MessengerAPI.MessengerClass.add_OnContactBlockChange(DMessengerEvents_OnContactBlockChangeEventHandl er )
I tried it also in a VB.NET project which connects the events automaticaly and it also throws the same COMException... anybody any idea what the problem is here?
thnx, Charly


Reply With Quote