Hello, any help with this or a point in the right direction is greatly appreciated.

I am trying to respond do wire up events from a com object.  I added a
reference to a com object.  It compiles fine but an error is generated at
runtime.


The following works when all but one of the events are commented out.  It
runs as expected and the event that is not commented out is fired properly.

//constructor
public BimServer() {

    ACS020 = new ACS020X.ACS020XClass();

    // events
   ACS020.OnPageVisited += new 
ACS020X.IACS020XEvents_OnPageVisitedEventHandler(this.OnPageVisited);
   ACS020.OnCurAnswer += new 
ACS020X.IACS020XEvents_OnCurAnswerEventHandler(this.OnNewAnswer);
   ACS020.OnStatusInfo += new 
ACS020X.IACS020XEvents_OnStatusInfoEventHandler(this.OnStatusInfo);
   ACS020.OnEndCycle += new 
ACS020X.IACS020XEvents_OnEndCycleEventHandler(this.OnQuestionEnd);

}

But if I uncomment more than one of the events i get the following exception
error when my object is created:

System.Runtime.InteropServices.COMException (0x80040202): Exception from HRESULT: 
0x80040202.


Stack Trace:

at System.Runtime.InteropServices.UCOMIConnectionPoint.Advise(Object pUnkSink, Int32& 
pdwCookie)
   at 
ACS020X.IACS020XEvents_EventProvider.add_OnCurAnswer(IACS020XEvents_OnCurAnswerEventHandler
 )
   at ACS020X.ACS020XClass.add_OnCurAnswer(IACS020XEvents_OnCurAnswerEventHandler )

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
   at bimlib.BimServer..ctor() in c:\answerchase\bimlib\class1.cs:line 4

Reply via email to