1 COM interop event OK, more than 1 event NOT OK in C#


the same problem following ducky's

===========================================================

hi everyone,

i'm writing c#.net app controlling automation server.
added reference com server(built borland delphi).
have interop wrapper classes generated.

have following code instantiate com server , attach
the event:

.......
obj = new abcclass();

obj.onuserclosed      += new
abcclassevents_onuserclosedeventhandler(this.abcuserclosed);
.....

everything compiles , runs ok.
i'm able execute methods , access properties of com object.
the event handler got called correctly too.

my problem if attach more 1 events below:

.......
obj = new abcclass();

obj.onuserclosed      += new
abcclassevents_onuserclosedeventhandler(this.abcuserclosed);
obj.onformsaved       += new
abcclassevents_onformsavedeventhandler(this.abcformsaved);
.....

i comexception during runtime.

it says, "an unhandled exception of type
'system.runtime.interopservices.comexception' occurred in
interop.las.dll

additional information: exception hresult: 0x80040202.
"

now, have 4 events need handle.  i have tested each of them.  each
works correctly individually , got called, cannot able
attach more 1 event.  any ideas?

thanks!
ducky

hi,did u pblm solved?i have similar 1 while calling delphi com obj in vb.net


.NET Framework  >  Common Language Runtime Internals and Architecture



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to Share webservice object to all user

Catalog Staging