It's not a blunt mapping, either - CLR tries to adapt WinRT types to their equivalents, where possible. winmd, you'll see that it actually looks like an extern assembly reference - there's no sleight of hand trickery such as type embedding there. Note that WinRT libraries themselves are fully native (and so native C programs that use WinRT do not require CLR at all) - the magic to expose all that stuff as managed is inside the CLR itself, and is fairly low level. winmd file, and all types and their members in its metadata become visible to you as if they were. This works differently from COM Interop - you don't need any intermediate artifacts such as interop assemblies, you just /r a. NET has the ability to directly reference WinRT components as if they were. Windows.UI.Xaml.Controls is closely matching ditto for Windows.UI.Xaml.Documents etc. A lot of them are very similar to WPF/Silverlight namespaces - e.g. Then you get several libraries, which are specifically dealing with UI - mostly these would be various namespaces under Windows.UI or Windows.UI.Xaml. There's a lot there, and it doesn't deal with UI alone - you also get namespaces such as, or, or. Again, look at "Windows Metadata" folder mentioned above to see what's there or just fire up Object Browser in VS and select "Windows 8.0" in the framework selector, to see what's covered. Then there are a number of libraries implemented in terms of that object model - defining WinRT interfaces and classes. Note, this doesn't mean that WinRT itself is managed - it simply reuses the file format. If you poke around, you'll see that they are actually CLI assemblies with no code, just metadata tables. winmd files - look inside "C:\Program Files (x86)\Windows Kits\8.0\Windows Metadata\" in Developer Preview. In COM you kinda sorta had that with typelibs, but not every COM component had them. One other big change is that all WinRT components have metadata available for them, just like. Of other notable things, WinRT also has parametrized ("generic") interfaces. NET-style (with delegates and add/remove subscriber methods, one per event) rather than the old COM model of event sources and sinks. NET - for example, WinRT object model has delegates, and events are done. It does add quite a lot of new concepts in comparison to COM of old, most of which come directly from. It uses COM as a base (so every WinRT object implements IUnknown and does refcounting), and builds from there. At the lowest level, WinRT is an object model defined on ABI level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |