WinRT metadata

The preceding example used the <windows.globalization.h> header file to discover the declaration of the ICalendar interface, including its IID. However, since COM/WinRT is supposed to provide interoperability between languages/platforms, how would a non-C++ language be able to use that header file?

The answer is that other languages can't use that header file; it's specific to C/C++. What we need is a kind of "universal header file", based on a well-defined structure and, thus, usable by any platform. This is the role of metadata files.

The format of metadata files (with extension .winmd) is based on the metadata format created for .NET. This was simply convenient, as that format is rich, providing all the necessary ingredients for ...

Get Mastering Windows 8 C++ App Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.