Thanks Dave,
I did mean exception thrown. Here it is:
[System.Runtime.InteropServices.COMException] = {"Exception from
HRESULT: 0x80040202"}
StackTrace = " at
System.Runtime.InteropServices.ComTypes.IConnectio nPoint.Advise(Object
pUnkSink, Int32& pdwCookie)\r\n at
WTReaderNet.ILRXReaderNetXEvents_EventProvider.add _OnTagMovedReader(ILRXReaderNetXEvents_OnTagMovedR eaderEventHandler
)\r\n at WTReaderNet.L...
I kind of thought it was too generic to post.
I have contacted the vendor with no response yet, but I have a feeling
it will be "we don't support .Net implementation" since the examples
they give are all in VB6. I was kind of hoping that interop was to
blame, and that someone else had seen a similar problem and had a
workaround.
Dave Sexton wrote:
Hi Stryker,
// second call fails
OCXClass.Event1 += new OCXClass.Event1Handler(Event1_Sub);
OCXClass.Event2 += new OCXClass.Event2Handler(Event2_Sub);
By "fails" do you mean that an Exception is thrown? If so I'd assume that the error has to do with an implementation detail of the
control and since the control is third-party it's hard to say what could actually be happening. Post the error if you can. You
might want to contact the control's vendor or creator on this one.
--
Dave Sexton
<St***********@gmail.comwrote in message news:11********************@b28g2000cwb.googlegrou ps.com...
First time poster, please be gentle :P
I am using a third party ocx control in a C# 2.0 application. The
interop seems to be working fine except for events. When I try and
attach an event, it only succeeds for one event at a time. Examples:
// works by itself
OCXClass.Event1 += new OCXClass.EventHandler(Event1_Sub);
// second call fails
OCXClass.Event1 += new OCXClass.Event1Handler(Event1_Sub);
OCXClass.Event2 += new OCXClass.Event2Handler(Event2_Sub);
// works, but Event 2 is only thing available
OCXClass.Event1 += new OCXClass.Event1Handler(Event1_Sub);
OCXClass.Event1 -= new OCXClass.Event1Handler(Event1_Sub);
OCXClass.Event2 += new OCXClass.Event2Handler(Event2_Sub);
Has anyone seen this type of behavior before? thanks in advance for
any tips.