Event problem towards .NET
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.
/ 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.IConnectio nPoint.Advise(Object
pUnkSink, Int32& pdwCookie)
at
BPTITest.ICoBpTiEvents_EventProvider.add_cardDataE vent(ICoBpTiEvents_cardDataEventEventHandler
)
at
BPTITest.ICoBpTiEvents_Event.add_cardDataEvent(ICo BpTiEvents_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
|