{"id":1162,"date":"2011-10-30T21:15:40","date_gmt":"2011-10-30T19:15:40","guid":{"rendered":"http:\/\/mariusbancila.ro\/blog\/?p=1162"},"modified":"2011-10-30T22:28:03","modified_gmt":"2011-10-30T20:28:03","slug":"winrt-and-winmd-files","status":"publish","type":"post","link":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/","title":{"rendered":"WinRT and winmd Files"},"content":{"rendered":"<p>If you tried the Win8 Developer Preview and built WinRT components (native or managed) you noticed the <strong>.winmd<\/strong> files. The name stands for Windows Meta Data and the format of these files is the same used by the .NET framework for the CLI, i.e. <a href=\"http:\/\/www.ecma-international.org\/publications\/standards\/Ecma-335.htm\">ECMA-335<\/a>. That means you can actually read these files with a tool such as ILDASM or Reflector, or of course, through .NET Reflection.<\/p>\n<p>If you look in C:\\Windows\\System32\\WinMetadata folder you&#8217;ll find the WinMD files for the Windows Runtime. You can browse the content of these files with one of the aforementioned disassemblers.<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2011\/10\/winmetadatafolder.png\" title=\"WinMetadata folder\" class=\"alignnone\" width=\"856\" height=\"601\" \/><\/p>\n<p>Here are two dummy WinRT components, one developed in C++\/CX and one in C#.<\/p>\n<table>\n<tr>\n<td>Native WinRT component in C++\/CX<\/td>\n<td>Managed WinRT component in C#<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>\n<pre class=\"cpp\" name=\"code\">\r\nnamespace WinRTNativeComponent\r\n{\r\n    public ref class MyWinRTComponent sealed\r\n    {\r\n        int _id;\r\n\t\tString^ _name;\r\n\r\n    public:\r\n\t\tMyWinRTComponent () {}\r\n\t\t~MyWinRTComponent () {}\r\n\r\n        property int Id\r\n        {\r\n            int get() { return _id; }\r\n            void set(int value) { _id = value; }\r\n        }\r\n\r\n\t\tproperty String^ Name\r\n\t\t{\r\n\t\t\tString^ get() {return _name;}\r\n\t\t\tvoid set(String^ value) { _name= value; }\r\n\t\t}\r\n\r\n        bool Update(int id, String^ name)\r\n\t\t{\r\n\t\t\t{\r\n\t\t\t\tif(_id == id)\r\n\t\t\t\t{\r\n\t\t\t\t\t_name = name;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n    };\r\n}\r\n<\/pre>\n<\/td>\n<td>\n<pre class=\"csharp\" name=\"code\">\r\nnamespace WinRTManagedComponent\r\n{\r\n    public sealed class MyWinRTComponent\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n\r\n        bool Update(int id, string name)\r\n        {\r\n            if (Id == id)\r\n            {\r\n                Name = name;\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<p>In the case of the native component, the output includes a DLL and a WINMD file (and of course a PDB file). In the case of the managed component, the output is either a DLL only or a WINMD only (plus the associated PDB file), depending on the Output type as defined in the project properties. If the type is <strong>Class Library<\/strong> the output is a DLL; this is enough if your component is supposed to be consumed from a managed language. However, if the component should be consumed from C++\/CX or Javascript, then the project type must be set to <strong>WinMD File<\/strong>. In this case the DLL is replaced by a WinMD file, that contains, at least in the current version, both the matadata (as implied by the name) and the implementation.<\/p>\n<table>\n<tr>\n<td>Native WinRT component in C++\/CX<\/td>\n<td>Managed WinRT component in C#<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2011\/10\/winmdnative.png\" title=\"WinMD for native component\" class=\"alignnone\" width=\"419\" height=\"600\" \/><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2011\/10\/winmdmanaged.png\" title=\"WinMD for managed component\" class=\"alignnone\" width=\"419\" height=\"600\" \/><\/td>\n<\/tr>\n<\/table>\n<p>It should be possible to use reflection with winmd files. However, the reflection capabilities of .NET 4.5 in this developer preview seem to be very limited. The only available Load method in the Assembly class is<\/p>\n<pre class=\"csharp\" name=\"code\">\r\npublic static Assembly Load(AssemblyName assemblyRef);\r\n<\/pre>\n<p>Trying to load the winmd file fails with a FailLoadException with the message &#8220;Could not load file or assembly &#8216;Winmdreflection, ContentType=WindowsRuntime&#8217; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)&#8221;.<\/p>\n<pre class=\"csharp\" name=\"code\">\r\ntry\r\n{\r\n    var assembly = Assembly.Load(\r\n        new AssemblyName()\r\n        {\r\n            Name = \"WinRTManagedComponent\",\r\n            ContentType = AssemblyContentType.WindowsRuntime\r\n        });\r\n}\r\ncatch (Exception ex)\r\n{                \r\n}\r\n<\/pre>\n<p>It is possible though to read information for the types described in an winmd file in native code using the  <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms230172.aspx\">IMetaDataImport<\/a>\/<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms232953.aspx\">IMetaDataImport2<\/a> COM interfaces. You can find an example <a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-AU\/winappswithnativecode\/thread\/211ef583-db11-4e55-926b-6d9ab53dbdb4\">here<\/a>. But this has the drawback that you have to instantiate an object first and then query for its type information.<\/p>\n<p>To use a Windows Runtime component in a Metro application (managed or native) you have to add a reference to it. That is pretty straight forward. In the following example I&#8217;m adding a reference in a C++ Metro application to the two WinRT components, one native and one managed, shown earlier. To do this, you can go to the project&#8217;s property page and open the Common Properties > Frameworks and References page, or use the References command from the project&#8217;s context menu which opens that page directly. You can add a reference to a project from the same solution, to a Windows component or you can browse for the winmd file.<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2011\/10\/winmdreference.png\" title=\"Adding a references to an winmd file\" class=\"alignnone\" width=\"800\" height=\"556\" \/><\/p>\n<p>Having done that you can instantiate the WinRT components.<\/p>\n<pre class=\"cpp\" name=\"code\">\r\nauto obj1 = ref new WinRTManagedComponent::MyWinRTComponent();\r\nobj1->Id = 1;\r\nobj1->Name = L\"marius\";\r\n\r\nauto obj2 = ref new WinRTNativeComponent::MyWinRTComponent();\r\nobj2->Id = 1;\r\nobj2->Name = L\"marius\";\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you tried the Win8 Developer Preview and built WinRT components (native or managed) you noticed the .winmd files. The name stands for Windows Meta Data and the format of these files is the same used by the .NET framework for the CLI, i.e. ECMA-335. That means you can actually read these files with a &#8230; <a title=\"WinRT and winmd Files\" class=\"read-more\" href=\"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/\" aria-label=\"Read more about WinRT and winmd Files\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[11,7,20,146,289],"tags":[451,296,305,300,299,303,304,290],"class_list":["post-1162","post","type-post","status-publish","format-standard","hentry","category-csharp","category-c","category-ctps-betas","category-windows","category-winrt","tag-c","tag-ccx","tag-ildasm","tag-managed","tag-native","tag-win8","tag-winmd","tag-winrt-2"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Marius Bancila\"\/>\n\t<meta name=\"keywords\" content=\"win8,winrt,winmd,c++,c++\/cx,c#,native,managed,ildasm\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Marius Bancila&#039;s Blog | About code. Mostly on C++\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"WinRT and winmd Files\" \/>\n\t\t<meta property=\"og:description\" content=\"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-10-30T19:15:40+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-10-30T20:28:03+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"WinRT and winmd Files\" \/>\n\t\t<meta name=\"twitter:description\" content=\"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#article\",\"name\":\"WinRT and winmd Files\",\"headline\":\"WinRT and winmd Files\",\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/10\\\/winmetadatafolder.png\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#articleImage\"},\"datePublished\":\"2011-10-30T21:15:40+02:00\",\"dateModified\":\"2011-10-30T22:28:03+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#webpage\"},\"articleSection\":\"C#, C++, CTPs &amp; Betas, Windows, WinRT, C++, C++\\\/CX, ildasm, managed, native, win8, winmd, winrt\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"position\":2,\"name\":\"IT\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"position\":3,\"name\":\"Software\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/#listItem\",\"name\":\".NET\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/#listItem\",\"position\":4,\"name\":\".NET\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/#listItem\",\"name\":\"C#\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/#listItem\",\"position\":5,\"name\":\"C#\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#listItem\",\"name\":\"WinRT and winmd Files\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/#listItem\",\"name\":\".NET\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#listItem\",\"position\":6,\"name\":\"WinRT and winmd Files\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/net\\\/csharp\\\/#listItem\",\"name\":\"C#\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Marius Bancila\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Marius Bancila\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#webpage\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/\",\"name\":\"WinRT and winmd Files\",\"description\":\"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2011\\\/10\\\/30\\\/winrt-and-winmd-files\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2011-10-30T21:15:40+02:00\",\"dateModified\":\"2011-10-30T22:28:03+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"WinRT and winmd Files","description":"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.","canonical_url":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/","robots":"max-image-preview:large","keywords":"win8,winrt,winmd,c++,c++\/cx,c#,native,managed,ildasm","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#article","name":"WinRT and winmd Files","headline":"WinRT and winmd Files","author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-content\/uploads\/2011\/10\/winmetadatafolder.png","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#articleImage"},"datePublished":"2011-10-30T21:15:40+02:00","dateModified":"2011-10-30T22:28:03+02:00","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#webpage"},"isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#webpage"},"articleSection":"C#, C++, CTPs &amp; Betas, Windows, WinRT, C++, C++\/CX, ildasm, managed, native, win8, winmd, winrt"},{"@type":"BreadcrumbList","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/mariusbancila.ro\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","position":2,"name":"IT","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","position":3,"name":"Software","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/#listItem","name":".NET"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/#listItem","position":4,"name":".NET","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/#listItem","name":"C#"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/#listItem","position":5,"name":"C#","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#listItem","name":"WinRT and winmd Files"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/#listItem","name":".NET"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#listItem","position":6,"name":"WinRT and winmd Files","previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/#listItem","name":"C#"}}]},{"@type":"Organization","@id":"https:\/\/mariusbancila.ro\/blog\/#organization","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","url":"https:\/\/mariusbancila.ro\/blog\/"},{"@type":"Person","@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author","url":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/","name":"Marius Bancila","image":{"@type":"ImageObject","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Marius Bancila"}},{"@type":"WebPage","@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#webpage","url":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/","name":"WinRT and winmd Files","description":"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/#breadcrumblist"},"author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"datePublished":"2011-10-30T21:15:40+02:00","dateModified":"2011-10-30T22:28:03+02:00"},{"@type":"WebSite","@id":"https:\/\/mariusbancila.ro\/blog\/#website","url":"https:\/\/mariusbancila.ro\/blog\/","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","inLanguage":"en-US","publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Marius Bancila's Blog | About code. Mostly on C++","og:type":"article","og:title":"WinRT and winmd Files","og:description":"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.","og:url":"https:\/\/mariusbancila.ro\/blog\/2011\/10\/30\/winrt-and-winmd-files\/","article:published_time":"2011-10-30T19:15:40+00:00","article:modified_time":"2011-10-30T20:28:03+00:00","twitter:card":"summary","twitter:title":"WinRT and winmd Files","twitter:description":"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8."},"aioseo_meta_data":{"post_id":"1162","title":"WinRT and winmd Files","description":"A short introduction to Windows Metadata files used to describe the Windows Runtime components in Win8.","keywords":[{"label":"win8","value":"win8"},{"label":"winrt","value":"winrt"},{"label":"winmd","value":"winmd"},{"label":"C++","value":"C++"},{"label":"C++\/CX","value":"C++\/CX"},{"label":"C#","value":"C#"},{"label":"native","value":"native"},{"label":"managed","value":"managed"},{"label":"ildasm","value":"ildasm"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-18 21:13:02","updated":"2025-12-12 07:37:23","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"author_meta":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"featured_img":null,"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"uagb_comment_info":3,"uagb_excerpt":"If you tried the Win8 Developer Preview and built WinRT components (native or managed) you noticed the .winmd files. The name stands for Windows Meta Data and the format of these files is the same used by the .NET framework for the CLI, i.e. ECMA-335. That means you can actually read these files with a&hellip;","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/net\/csharp\/\" class=\"advgb-post-tax-term\">C#<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/ctps-betas\/\" class=\"advgb-post-tax-term\">CTPs &amp; Betas<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/windows\/\" class=\"advgb-post-tax-term\">Windows<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">WinRT<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C#<\/span>","<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">CTPs &amp; Betas<\/span>","<span class=\"advgb-post-tax-term\">Windows<\/span>","<span class=\"advgb-post-tax-term\">WinRT<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">C++<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">C++\/CX<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">ildasm<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">managed<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">native<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">win8<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">winmd<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/winrt\/\" class=\"advgb-post-tax-term\">winrt<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">C++\/CX<\/span>","<span class=\"advgb-post-tax-term\">ildasm<\/span>","<span class=\"advgb-post-tax-term\">managed<\/span>","<span class=\"advgb-post-tax-term\">native<\/span>","<span class=\"advgb-post-tax-term\">win8<\/span>","<span class=\"advgb-post-tax-term\">winmd<\/span>","<span class=\"advgb-post-tax-term\">winrt<\/span>"]}},"comment_count":"3","relative_dates":{"created":"Posted 15 years ago","modified":"Updated 15 years ago"},"absolute_dates":{"created":"Posted on October 30, 2011","modified":"Updated on October 30, 2011"},"absolute_dates_time":{"created":"Posted on October 30, 2011 9:15 pm","modified":"Updated on October 30, 2011 10:28 pm"},"featured_img_caption":"","series_order":"","jetpack_shortlink":"https:\/\/wp.me\/pYNdv-iK","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/1162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/comments?post=1162"}],"version-history":[{"count":18,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/1162\/revisions"}],"predecessor-version":[{"id":1181,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/1162\/revisions\/1181"}],"wp:attachment":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/media?parent=1162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/categories?post=1162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/tags?post=1162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}