How does the mapping between WinRT and managed?

I heard that the new WinRT is an unmanaged structure and is based on COM, but somehow they figured out how to simplify the mapping between WinRT and managed code. I would like to know how this mechanism works?

+6
source share
1 answer

Windows Runtime is all the metadata APIs that read various language projections (C ++, JavaScript, and C #).

Because the API form is described in metadata, language runtimes and compilers can talk about the API and know how to generate code for these APIs.

For the CLR, the task is a little simpler, because the ECMA 335 metadata format, which is the CLI metadata format used by the CLR, so the translation is a bit simplified for the CLR.

But overall, the translation is simple, given that you have a machine-readable representation of all the APIs present on the machine.

+9
source

Source: https://habr.com/ru/post/897655/


All Articles