What is Windows Runtime Library (WRL)

WRL is the new API for targeting Metro Style Applications available in Windows 8. WRL allows to build WinRT components. WinRT means Windows Runtime. It is all native development. Power and Performance for fast and fluid applications.

WRL is a C++ template library using traditional and new C++ programming features. It is build with standard ISO C++. C++/CX syntax looks like C++/CLI. C++/CX brings extensions to C++.

WRL is like the new ATL. It allows to build new COM components. There is no IDispatch, no managed code, no JIT nor any links to the .NET framework. WRL brings like a C++/CLI syntax but it is native, there is no managing code. WRL is very low level.

WRL do not use exceptions, internally. All API returns HRESULT. but projection allows other language to see exceptions.

WinRT components vs COM components. In COM, you have an IDL file which produces a H file and a TLB file and you create CPP and ATL, you build and you register your component. In WinRT, there is still IDL with a H file and a WINMD (metadata) file and you create CPP and WRL,  you build and you create a manifest and don’t need registration. At the code level, in WinRT, you just write class T : RuntimeClass<IInterface1, IInterface2>. You just need an IInspectable stuff. In WinRT, GUID are strings. The guideline is to write it as a namespace like company.component.version. Then the last step is to make the package of installation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: