locked
Which APIs on Windows 8 and Windows RT

    Question

  • Hi,

    I deal with Windows Store App development for some weeks now but I still don t get the (API)-architecture.

    Can someone please give me an overview which APIs(.NET, WinRT, Win32) I can use with which language when developing Windows Store Apps?

    And is there a difference of APIs I can use if I want to target both Windows 8 and Windows RT?

    I ask because when you look at the Windows 8 Plattform diagramm it seems as if all Windows Store  Apps only use the WinRT-API. But at this msdn website (http://msdn.microsoft.com/de-de/library/windows/apps/br211369.aspx) it says that there is also a subset of .NET-APIs when you develop your Store App with C#, VB and some WIN32-APIs when you develop your App in C++ which you can use.

    I also read that when you develop for WindowsRT you can only use the WinRT-API as the Win32-API is reserved only for Microsoft signed Desktop-Apps. Is that right?

    Thanks in advance


    • Edited by flutter-by Tuesday, March 26, 2013 6:02 PM
    Tuesday, March 26, 2013 6:01 PM

Answers

  • Hi flutter-by,

    The available APIs for Windows Store app in Windows 8 and Windows RT are same.

    The link you posted above lists all available APIs for Windows Store app.

    Only a subset of Win32-API that listed in the documentation can be used by Windows Store app. It also works in Windows RT.

    Best regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 27, 2013 1:52 AM
    Moderator

All replies

  • Hi flutter-by,

    The available APIs for Windows Store app in Windows 8 and Windows RT are same.

    The link you posted above lists all available APIs for Windows Store app.

    Only a subset of Win32-API that listed in the documentation can be used by Windows Store app. It also works in Windows RT.

    Best regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 27, 2013 1:52 AM
    Moderator
  • Hi Min Zhu,

    the APIs for Windows 8 and Windows RT are the same..thats good to know. As I don t have any experience with .Net and Win32 API i have some more questions.

    So the way i understand the API list is as follows:

    -WinRT API can be accessed from all supported languages (C++/C, C#/VB , Javascript) ->because of projection

    -Subset of .Net API can only be from c# or VB

    -Subset of Win32-APi can only be used with C++/C

    1 ) Is that correct? So you cannot use Win32 API in an app that is completely implemented in C#/VB & XAML?

    2) Can I use the WinRT-API in my own Windows Runtime Component? For example if I implement the component in c# can I access the WinRT-API in this component?

    2) So lets say I have a c#+ XAML app on top and  in addition a windows runtime component which I implement in C++. That would mean that the c#+XAML part can access the WinRT-API and the .NET-API. In my windows runtime component I could access the WinRT-APi and the Win32-API right?

    Is there any additional material that you can suggest? I kind of feel a little lost with the APIs...

    Best regards

    • Proposed as answer by cas.mendes Tuesday, April 9, 2013 2:25 PM
    Wednesday, March 27, 2013 8:55 PM
  • Hi,

    We can use WinRT components to do this.

    We can create a C++/CX components. We can use Win32 API in that components, write a WinRT wrapper, and call them in C# XAML.

    We can also create a C# components which it contains .NET API, we can also use it in C++/CX project.

    Please take a look of this document
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh441572.aspx

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 28, 2013 5:46 AM
  • Hi Jesse Jiang,

    I think I didn t explain my problem good enough... I am not looking for a way to combine different languages in an app. I know that if you expand the Windows Runtime with your own component that you can use that component from all supported languages. I want to get an overwiew from which languages I can use the three different APIs (WinRT, Win32, .Net).

    1 ) For example when I have a C# & XAML App which of the 3 APIs (WinRT, Win32, .Net)  can I access (Without having an additional Runtime Component)? 

    2) When I implement my own Windows Runtime component lets say in C++..which APIs(WinRT, Win32, .Net) can I access inside this component? Only Win32 or also WinRT?

    Best regards,

    flutter-by

    Thursday, March 28, 2013 8:23 AM
  • First, There is no languages can access all API without wrapper.

    1 ) For example when I have a C# & XAML App  which of the 3 APIs (WinRT, Win32, .Net)  can I access (Without having an additional Runtime Component)? 
    No.

    2) When I implement my own Windows Runtime component lets say in C++..which APIs(WinRT, Win32, .Net) can I access inside this component? Only Win32 or also WinRT?
    Yes.

    Windows Runtime like COM technology, which is a specification to make different languages use each functions. To achieve this, we need a COM wrapper, so that we need Windows Runtime component to let C# codes and use C++ APIs.

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 1, 2013 6:15 AM