Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the mapping between WinRT and managed works?

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

like image 984
gyurisc Avatar asked Sep 20 '11 04:09

gyurisc


1 Answers

The Windows Runtime represents all APIs in metadata, which the various language projections (C++, JavaScript and C#) read.

Because the API shape is described in metadata, the language runtimes and compilers can reason about the APIs and know how to generate code for those APIs.

For the CLR, the job is a tiny bit easier, since the metadata format is ECMA 335, which is the CLI metadata format used by the CLR - thus the translation is slightly easier for the CLR.

But in general, the translation is straightforward given that you have a machine readable representation of all the APIs present on the machine.

like image 180
ReinstateMonica Larry Osterman Avatar answered Sep 28 '22 08:09

ReinstateMonica Larry Osterman