Finding alternatives to restricted API RRS feed

  • Question

  • What is the best process of finding equivalent WinRT API to a given restricted Win32 API not allowed to use in Metro App?

    For example Sleep, DebugBreak, GetModuleFilename these are restricted API for Metro App. How to find the equivalent of these APIs in WinRT API?

    For a particular restricted API, in the msdn reference, all it says is "Applies to: desktop apps only". Ok, then what's the equivalent API in WinRT or some other workaround?

    Would be nice if there is somewhere a list of Restricted APIs for Metro and there equivalent WinRT API or some generic work arounds.


    Thursday, March 15, 2012 9:33 PM


All replies

  • Please note that not all the restricted APIs have equivalent APIs in Metro Style environment.

    You can refer to Alternatives to Windows APIs in Metro style apps for more details.

    Best wishes,

    Robin [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 16, 2012 1:43 AM
  • I am trying to create a OS abstraction layer to be used with common sources for Linux, Windows and Metro. The OS abstraction layer for Window and Linux works well. Addition of metro makes it hard to implement OS abstraction and to keep it thin. 

    It looks like more of higher level functionality will need to be pulled in to OS abstraction (making it thicker) because there is no one-to-one correspondence between APIs of Windows and Metro. More like dealing with metro apps all together  differently, after all its a sandbox. 



    Friday, March 16, 2012 3:59 PM
  • Pointing this question to the Alternative APIs really isn't helpful.  I don't see any mention of Debugging or DebugBreak alternatives there.   How are we supposed to break into the debugger without DebugBreak on a WinRT system?  This is a pretty fundamental issue especially with the removal of MessageBox and other useful debugging aids.  I second the request for alternatives to the "Desktop-only" APIs.

    Friday, November 30, 2012 7:14 AM