From Win32 to WinRT

Posted on 2016-09-08 Gabriel Smith

If you have been keeping up with my blog, you probably remember the post about my first experiences with Windows 8 and developing for Windows Metro. In case you didn't have the opportunity to read it, I'll give a quick summary. At that time, I was using the Windows 8 Developer Preview along with the Visual Studio 2011 Developer Preview. I was excited to see that our existing .NET 4.0 libraries could be used in a new Metro C# project. It took a bit of research to figure out the how to interop between the .NET and Metro Stream objects, but once I had that nailed down everything went pretty smoothly.

Since then, I have read a lot of material about Windows 8 and the new WinRT runtime. Based on what I was reading, it didn’t make sense that our .NET 4 libraries integrated so easily with Metro applications. The excitement expressed in my previous post was short lived; because as it turns out, components targeting the .NET 4 Framework are NOT supported in Metro. While it worked in the Developer Preview, the newer Windows 8 Consumer Preview and VS 2011 only allow the use of libraries targeting the .NETCore. If you use .NET 4 libraries now, you will receive the following error:

A reference to 'Leadtools.dll' could not be added. The project targets '.NETCore' while the file reference targets '.NETFramework'. This is not a supported scenario

Where do developers go from here?
One thing Microsoft has stressed from the beginning in regards to Windows 8 is that it will run on both x86/64 PCs as well as ARM mobile devices. The goal is to provide the same fast, fluid and user friendly experience on all target platforms. The WinRT accomplishes this by providing a middle layer API that programmers can develop against, allowing the applications to "just work" on each platform. Therefore, as long as you target the WinRT and .NETCore, you can rest assured that your application will work on a variety of platforms and devices with no additional work necessary.

As with any new technology, there is still a learning curve. Thankfully, Microsoft has done a good job making this transition easy for the majority of developers. If you are a web developer, you can write HTML5/Javascript applications that use the WinRT. If you have worked with WPF and Silverlight, your XAML skills will carry over to Metro development. Even C++ developers can target the WinRT directly.

Microsoft isn't abandoning anyone either since Windows 8 will continue to support traditional desktop applications that target Win32 API, .NET, Silverlight, WPF and the like. This is good news for those who simply want to make minor changes to their application to support the new OS. Of course, the drawback for those applications is that they won't run in the new Metro style or Metro platforms like ARM.

What does this mean to LEAD and our customers?
As soon as we learned that native Metro applications could only consume components that target .NETCore, we knew that our development teams had some work to do. We see Windows 8 as an innovative operating system that opens doors to multi-platform and mobile device development to many Windows programmers, and we believe developers will take that step. LEADTOOLS customers can expect a complete Metro SDK for WinRT that will provide all of the features and functionality within our .NET and C++ libraries. In addition, we have been working on our "LEADTOOLS Anywhere" toolkit which will include HTML5 and JavaScript libraries that can be used to create rich Metro applications.

Thanks,
Otis Goodwin
LEADTOOLS Blog

LEADTOOLS Powered by Apryse,the Market Leading PDF SDK,All Rights Reserved