Dev Center - Metro style apps > Windows Metro style apps Forums > Building Metro style apps with C++ > Is it possible to allocate executable memory? Are there alternatives for VirtualAlloc and friends?

Answered Is it possible to allocate executable memory? Are there alternatives for VirtualAlloc and friends?

  • Wednesday, September 28, 2011 6:55 AM
     
     

    From http://msdn.microsoft.com/en-us/library/windows/apps/br205762(v=VS.85).aspx it seems that Metro Apps which want to go on the Store cannot use Win32 Virtual Memory Management routines like VirtualAlloc, VirtualProtect, etc. Are there WinRT alternatives for similar functionality? Is it possible to dynamically allocate and mark a particular area in memory as executable?

Answers

All Replies

  • Thursday, September 29, 2011 4:46 PM
     
     Answered
    The Virtual* family of APIs is not a part of the metro SDK. 
  • Thursday, September 29, 2011 7:41 PM
     
     
    Based on the limitations that they are putting on metro apps, and the verification they want to do before putting them in the app store, I would be very surprised if they were willing to let you dynamically generate code (thereby getting around all of those restrictions).