> I need to find out for class Foo whether a method implements a method
> from interface IFoo or not. In case of method Bar() I can use
> EnumMethodImpls, but for Baz() there is no MethodImpl entry.
I'm not sure what the question is. If the class supports the
interface, you know it implements all methods in the interface. Do you
mean that you want to know ehether the class implements a particular
method directly, or whether it inherits it?

Signature
www.midnightbeach.com
Reinhard - 06 Apr 2005 19:46 GMT
With API IMetaDataImport::EnumInterfaceImpls I determine that class Foo
implements interface IFoo. Fine. Next thing is, I need to know whether
a particular method of Foo is implementing a method defined by
interface IFoo. In my example Bar() & Baz().
In the case of Bar() which is implemented by *explicitly* specifying
the IFoo.Bar, I can use IMetaDataImport::EnumMethodImpls to see that
CFoo.Bar implements IFoo.Bar. However for methods which do not
explicitly implement the interface (as for Baz()), there is no entry in
MethodImpls. There must be another API to get that information. This is
what I am looking for.
Background: My project is a recorder which uses the Profiling API of
Whidbey to record activiations of methods from a given interface
(filtered by interface). Example: "record all method calls which
implement IComparable".
Reinhard - 07 Apr 2005 08:26 GMT
Someone emailed me with an answer. I unintentionally deleted this
message from my mailbox. Can you please resend your message?