Board index » cppbuilder » Event problem towards .NET
A Jarold
CBuilder Developer |
Event problem towards .NET2007-05-08 03:31:52 PM cppbuilder55 I have a com object with several events that works fine when used for instance with VB6 or C++. However when trying to use it from a .NET code it crashes if I add more than 5 event handlers, when creating the object. Note that it doesn't matter what event handlers, just that there are more than five handlers and it doesn't work. The com object was written in BDS2006 environment using C++Builder. / Anders Error message when used from VB.NET. System.Runtime.InteropServices.COMException was unhandled ErrorCode=-2147220991 Message="An event was unable to invoke any of the subscribers (Exception from HRESULT: 0x80040201)" Source="mscorlib" StackTrace: at System.Runtime.InteropServices.ComTypes.IConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie) at BPTITest.ICoBpTiEvents_EventProvider.add_cardDataEvent(ICoBpTiEvents_cardDataEventEventHandler ) at BPTITest.ICoBpTiEvents_Event.add_cardDataEvent(ICoBpTiEvents_cardDataEventEventHandler ) at BPTI_test.frmMain.set_api(CoBpTi WithEventsValue) at BPTI_test.frmMain.frmMain_Load(Object sender, EventArgs e) in C:\Documents and Settings\Remuz\My Documents\Visual Studio 2005\Projects\BPTI-test\BPTI-test\frmMain.vb:line 38 |