Porting Desktop Apps to Windows 8.1 Store Apps

  Windows Store Applications bring a brand new look and user experience. It’s also a great challenge for the Windows developers who are familiar with the desktop applications development to adapt to the new interface and programing model. In this article, I try to provide the generic guideline on how to port desktop apps to…

2

调用ActivateApplication启动Windows商店应用可能导致商店应用崩溃

最近有开发者反映从Windows商店下载下来的某些商店应用如果使用IApplicationActivationManager:: ActivateApplication启动的话会有问题。一个典型的例子就是Bubble Birds 1.0。如果你用这个函数启动Bubble Birds程序的话,在某些时候会报出以下异常:    IApplicationActivationManager:: ActivateApplication可以在当前会话通过通用启动合同(Windows.Launch)来激活指定的Windows商店应用。由于该函数只能用于桌面应用,通常我们会使用它来做自动化测试。下面是一个调用该函数的示例代码: int _tmain(int argc, _TCHAR* argv[]) {        LPCWSTR appId = L”<Use your app id>”;        CoInitialize(NULL);        IApplicationActivationManager* paam = NULL;        HRESULT hr = S_OK;        hr = CoCreateInstance(CLSID_ApplicationActivationManager, NULL, CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&paam));        if (SUCCEEDED(hr))        {               hr = CoAllowSetForegroundWindow(paam, NULL);               if (SUCCEEDED(hr))              …


Some windows store apps crash when they are launched by ActivateApplication

I’m heard from the developers that some windows storeapplications downloaded from Windows store may crash when they are launched by IApplicationActivationManager::ActivateApplication API. Bubble Birds 1.0 is such a sample. Sometimes it shows black screen when it’s launched by this API and then report following exception:   ActivateApplication is used to activate the specified Windows Store…