tdakkota/win32metadata

signature reader: add support for parametrized types/methods

Opened this issue · 2 comments

Hi! I'm trying to read the information of the IAsyncOperation<TResult> interface, and when I call the following function:

methodSig, err := myMethod.Signature.Reader().Method(ctx)
// err == nil
// methodSig is empty

The methodSig is empty, but there has been no error.

This problem is related to #36. Debugging the code I can see that the method is indeed failing with unexpected element type 0x13:

Screenshot 2022-06-14 at 15 32 06

Element type 0x13 is ELEMENT_TYPE_VAR, which according to the docs is "A class variable type modifier".

Are there any plans to support this? This may require some changes to the Element struct to add the information related to the generic type.

I've added ELEMENT_TYPE_VAR and ELEMENT_TYPE_MVAR support in #41 and made v0.1.0 release. Can you check it?

It's working fine now. Thank you!