locked
WinRT and Win32

    Question

  • I’m little confused about WinRT vs Win32 – Can somebody tell me is this technology completely separate from Win32 API and doing everything on its own or it is using Win32 under the cover?

    Wednesday, September 21, 2011 8:39 AM

Answers

  • WinRT is a reimagened version of Win32.
    Where it's hard to have communication between programs in Win32, WinRT provides easy access to the features of another application (check the charms for example).
    Also, not everything you can do on Win32 is supported by WinRT because it runs in a sandboxed mode, protecting your applications just a little better.

    Regards,

    Dylan Meeus


    0x2B |~ 0x2B Blog : www.it-ca.net/blogdylan
    • Marked as answer by dominikj Wednesday, September 21, 2011 9:51 AM
    Wednesday, September 21, 2011 9:41 AM
  • I’m little confused about WinRT vs Win32 – Can somebody tell me is this technology completely separate from Win32 API and doing everything on its own or it is using Win32 under the cover?


    The short answer is yes, WinRT is completely seperate from Win32.
    • Marked as answer by dominikj Wednesday, September 21, 2011 9:51 AM
    Wednesday, September 21, 2011 9:48 AM

All replies

  • WinRT is a reimagened version of Win32.
    Where it's hard to have communication between programs in Win32, WinRT provides easy access to the features of another application (check the charms for example).
    Also, not everything you can do on Win32 is supported by WinRT because it runs in a sandboxed mode, protecting your applications just a little better.

    Regards,

    Dylan Meeus


    0x2B |~ 0x2B Blog : www.it-ca.net/blogdylan
    • Marked as answer by dominikj Wednesday, September 21, 2011 9:51 AM
    Wednesday, September 21, 2011 9:41 AM
  • I’m little confused about WinRT vs Win32 – Can somebody tell me is this technology completely separate from Win32 API and doing everything on its own or it is using Win32 under the cover?


    The short answer is yes, WinRT is completely seperate from Win32.
    • Marked as answer by dominikj Wednesday, September 21, 2011 9:51 AM
    Wednesday, September 21, 2011 9:48 AM
  • I’m little confused about WinRT vs Win32 – Can somebody tell me is this technology completely separate from Win32 API and doing everything on its own or it is using Win32 under the cover?


    The short answer is yes, WinRT is completely seperate from Win32.

    Lol yeah that sums it up :P
    0x2B |~ 0x2B Blog : www.it-ca.net/blogdylan
    Wednesday, September 21, 2011 9:49 AM
  • How are they related to each other architecturally? I mean, typically we have 3 environment subsystems in Windows NT (Win32 plus IEEE's POSIX and IBM's OS/2). So is WinNT the fourth one?
    Well this is the world we live in And these are the hands we're given...
    Wednesday, September 21, 2011 11:13 AM
  • I have no official source, but it really seems that WinRT is a new layer on top of Win32 (and DirectX), not like shown in the famous schema. It appears to be a library only, and there is no subsystem.

    From other persons investigations:

    Some of the new COM functionalities are store in a new dll combase.dll. This dll is some kind of new oel32.dll.

    WinRT dlls rely on classical dlls like user32.dll and kernelbase.dll from MinWin.

    There are traces of new functions in Win32 like CreateWindowInBand and GetPointerDeviceRects, and new dlls like twinapi.dll which seems to have a classical Win32 interface (C functions like CreateImmersiveWindow).

    The window that contains metro app is a classical win32 window. The controls are drawn "manually" like in WPF (Or swing) , probably with a choice between DirectX and an other method. Controls are perhaps managed by DirectUI.dll, which is somehow agcore.dll from silverlight ported to WinRT. But I don't know if DirectUI.dll interface is WinRT, COM or Win32 like.

    I am sorry for my mistakes and imprecisions. You can find additional information by googling functions and dlls posted in this message. You should find links to this thread and few others forums.

    Anyway, using depends, process explorer and a debugger should be the more effective way to have true information about how WinRT is made.

    Wednesday, September 21, 2011 1:47 PM
  • To add to rt15's reply.
    The WinRT does seem to be a layer ontop of Win32, think they even mentioned that during a keynote ^^

    Regards,

    Dylan Meeus


    0x2B |~ 0x2B Blog : www.it-ca.net/blogdylan
    Wednesday, September 21, 2011 5:01 PM
  • After reading the preceeding posts I am more confused with the relation between WinRT and Win32 than as I was before. And Dylan's original question is marked as Answered!

    I am more inclined to see WinRT as just another  API to be used by developers instead of the .NET Framework or MFC or ATL.  In the end every single call to any method in any class of WinRT is implemented as calls to Win32 API functions. If this is not true can someone give me at least one example of a WinRT API that is independent from Win32?

    Thanks,

    NFG


    Trainer

    Monday, August 27, 2012 2:47 AM
  • It's almost one year passed since this discussion and yet we don't still have no answer to the question. Could anybody please point out on the good explanation and coverage of WinRT and its relations to Win32 API and calls? Thank you.


    Well this is the world we live in And these are the hands we're given...

    Monday, August 27, 2012 8:29 AM
  • Yes, many people are saying many different things about this subject.

    This is strange that nobody have installed windows 8 and partially reverse engineered winrt yet. It seems that there is currently very few information, like dependency walker analysis and call stack. Here are some call stacks, and at least, we can see the classical DispatchMessage:

    http://blogs.msdn.com/b/lixiong/archive/2011/12/05/retrospect-different-microsoft-technologies-from-win8.aspx

    Anyway let's take a little example from my investigations on the documentation.

    There are new functions to user32.dll in windows 8. One of them is GetPointerDevices. It is documented:

    http://msdn.microsoft.com/en-us/library/windows/desktop/hh437265(v=vs.85).aspx

    This is an old style C function like many Win32 others.

    And know what? There is a also a GetPointerDevices function in WinRT:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.input.pointerdevice.getpointerdevices#Y0

    I don't know which one is calling the other, or if there are completely separated...

    But I would be really surprised if the WinRT one is not simply calling the low level user32.dll function.

    Monday, August 27, 2012 10:15 AM
  • Thank you for your response!

    In other words, all in all, WinRT more looks like a bunch of callback functions to date, correct?


    Well this is the world we live in And these are the hands we're given...

    Monday, August 27, 2012 10:26 AM