{"id":6347,"date":"2012-08-23T08:10:57","date_gmt":"2012-08-23T07:10:57","guid":{"rendered":"http:\/\/www.itwriting.com\/blog\/?p=6347"},"modified":"2012-08-23T08:10:57","modified_gmt":"2012-08-23T07:10:57","slug":"third-party-compilers-locked-out-of-windows-runtime-development","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/6347-third-party-compilers-locked-out-of-windows-runtime-development.html","title":{"rendered":"Third-party compilers locked out of Windows Runtime development"},"content":{"rendered":"<p>Embarcadero\u2019s chief scientist Allen Bauer has <a href=\"https:\/\/forums.embarcadero.com\/message.jspa?messageID=484319#484319\" target=\"_blank\">posted<\/a> about the problems facing tool vendors who want want to support Microsoft\u2019s Windows Runtime (WinRT) platform with their own compilers, which he calls \u201cWindows 8&#8217;s \u2018dirty little secret.\u2019\u201d<\/p>\n<p>The issue is that in order to enforce security and isolation in WinRT apps, Microsoft prohibits certain API calls. Even if you find a way to use them, applications that use these calls will not be accepted into the Windows Store, which in effect means no public distribution.<\/p>\n<blockquote>\n<p>We are very keen on supporting WinRT with native Delphi &amp; C++ code. Right now, the issues surrounding the WinRT space center around the fact that many OS-supplied APIs which are required by anyone implementing their own language RTL are actually off-limits unless you&#8217;re the VC++ RTL DLL. You know, little things like RtlUnwind for exception processing and VirtualAlloc (et. al.) for memory management&#8230; Any calls to those APIs from your application will automatically disqualify your application from being an &quot;official&quot; WinRT application capable of delivering through the MS app store.<\/p>\n<p>Right now the VC++ RTL DLL is given special dispensation since that is the library that makes the calls to those forbidden APIs and not directly from the user&#8217;s app. We&#8217;re currently rattling some cages at MS to find out how or if they&#8217;re going to allow third-party tools to target WinRT. Until we can get past that, targeting WinRT isn&#8217;t actually possible from a deliverable product sense. We are able to build WinRT applications with Delphi that work with a developer certificate, however they all fail the application qualification checks because of the aforementioned (an other) APIs.<\/p>\n<\/blockquote>\n<p>Bauer adds that there are other restrictions that make it hard to create an alternative toolchain:<\/p>\n<blockquote>\n<p>For instance, you cannot merely open any file, access the registry, and even use the loopback (127.0.0.1) adaptor. LoadLibrary cannot be used to load any arbitrary DLL; you must call LoadPackageLibrary and only on a DLL that is present in the digitally signed appx package. WinRT is a seriously locked down sandbox or &quot;walled-garden&quot; with some extremely high walls. <\/p>\n<\/blockquote>\n<p>Embarcadero\u2019s answer has been to create a framework that makes desktop apps look and behave somewhat like WinRT apps. I posted about these fake metro apps <a href=\"http:\/\/www.itwriting.com\/blog\/6329-embarcardero-previews-metropolis-in-rad-studio-xe3-fake-metro-apps.html\" target=\"_blank\">here<\/a>. Even Live Tiles are supported. However, these apps cannot be distributed via the Store either, but only through a desktop setup. In addition, they lack the security of true WinRT, and access to the Contracts system for safe exchange of data.<\/p>\n<p>The company does have a .NET tool in the works, called Prism, that will build WinRT apps.<\/p>\n<p>Who is the villain here? Embarcadero\u2019s concern is understandable, since it is locked out of creating a native code compiler for WinRT. On the other hand, to what extent can Microsoft relax the restrictions without blowing a hole in the WinRT security story. There are parallels with the complaints from Google and Mozilla that they cannot compete equally with IE10 in the Modern UI environment.<\/p>\n<p>Thanks to .NET support, Microsoft does have a measure support for alternative languages; it is the Common Language Runtime after all. What would be better though would be to support <a href=\"http:\/\/llvm.org\/\" target=\"_blank\">LLVM<\/a>, as Apple does on iOS, though this is not likely to be on Microsoft\u2019s roadmap.<\/p>\n<p><em>Thanks to Eric Grange for pointing me to this post.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Embarcadero\u2019s chief scientist Allen Bauer has posted about the problems facing tool vendors who want want to support Microsoft\u2019s Windows Runtime (WinRT) platform with their own compilers, which he calls \u201cWindows 8&#8217;s \u2018dirty little secret.\u2019\u201d The issue is that in order to enforce security and isolation in WinRT apps, Microsoft prohibits certain API calls. Even &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/6347-third-party-compilers-locked-out-of-windows-runtime-development.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Third-party compilers locked out of Windows Runtime development<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,55,80,97],"tags":[318,363,996,1028],"class_list":["post-6347","post","type-post","status-publish","format-standard","hentry","category-embarcadero","category-microsoft","category-software-development","category-windows","tag-delphi","tag-embarcadero","tag-windows","tag-winrt"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/6347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=6347"}],"version-history":[{"count":0,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/6347\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=6347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=6347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=6347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}