Reputation: 3810
Hi have a huge code base consisting of many solutions, many EXE projects, many static library projects (*.lib) etc.. coded in C++ for desktop windows mode. In this codebase I've used many calls/APIs from WDK(WIndows driver kit) making many low level calls. Also I've extensively used win32 APIs.
I want to port this whole codebase to modern(metro) mode.
What are the things I need to take care while porting my desktop C++ codebase (EXEs, static libs etc..) to Modern(metro) compliant.
Will this porting just incolve writing a wrapper around the existing desktop application or will it involve much code change like replace win32 APIs with something different for modern(metro) mode. Details would be helpful.
Upvotes: 0
Views: 164
Reputation: 21899
If your app has many ties to the system, which I suspect yours does with many low level WDK calls, then those could be troublesome. I suspect your app will need to stay as a desktop app, at least if you plan to distribute it through the store.
Your UI (unless it is DirectX) will need to be completely rewritten to use the HTML or Xaml libraries available to Windows Store apps.
If your core logic is separate from the UI and if it's mostly self-contained then it may be straight forward to bring over. Standard C++ libraries are mostly all allowed, but some (particularly file API) are limited to the app's security context.
Windows Store apps are sandboxed and restricted from accessing the system as a whole. They have access to a subset of the Win32 API documented at Win32 and COM for Windows Runtime apps. Windows Store apps have direct access only to a few locations on the file system (read access to their install directory and read/write to their application data directory) and can only see the rest of the file system through a brokerage system using StorageItem objects.
All that said, if this is an enterprise app that you plan to side-load rather than loading through the store then you can use a Brokered Windows Runtime Component (BWRC) to bypass the sandbox and have full desktop permissions. In this case you'd write a Windows Store app for the UI and the BWRC to wrap the existing desktop code.
Upvotes: 1