Event in interface

  • Thread starter Wernfried Schwenkner
  • Start date
W

Wernfried Schwenkner

I have the following problem while using events. The event is used in
two assemblies (remoting). Therfore I defined an interface assembly with
the event. One assembly is written in C# the otherone in managed C++.

Now, when I write the interface in C# I can't compile the C++-assembly,
getting an error that the signature of the event doesn't match with the
one declared in the C++-class.

Vice versa, writing the interface in in C++, I get a warning in the C#-
assembly, telling the same. While ignoring this warning all seems to
work perfectly. Can anyone point me what the reason to this behaviour
is? It seems for me, in C++ there will be generated three methodes (add,
remove and rise) for the __event-statement. In C# it works another way
and so the signature is another one.
 
R

Ronald Laeremans [MSFT]

Can you use ildasm to look at the method signatures for the event methods to
see whether they differ between the C++ and C# versions?

Ronald Laeremans
Visual C++ team
 
W

Wernfried Schwenkner

Can you use ildasm to look at the method signatures for the event methods to
see whether they differ between the C++ and C# versions?

Thanks for Your hint. Unfortunatly it will take a little time to check
this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top