Compartilhar via


Direct3D app model for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The app model for Direct3D apps on Windows Phone is similar to the app model for Windows Store. This topic will describe the instances where the app model is different on the phone.

App lifecycle

The following lists the differences in the app lifecycle for Windows Phone. For more information on the Windows Store app model, see Application lifecycle (Windows Store apps).

  • When the application is launched and the Activated event is raised, the only supported values for PreviousExecutionState on Windows Phone are NotRunning and Suspended.

  • When the application is launched and the Activated event is raised, the only supported values for Kind on Windows Phone are Launch and PickerReturned.

  • Direct3D apps on Windows Phone can only have a single IFrameworkView. Calls to CreateNewView(String, String) will fail with the value E_NOTIMPL.

  • The Windows.ApplicationModel.Background namespace is not supported on Windows Phone. Background execution is not supported for Direct3D apps on Windows Phone.

Threading

Windows Phone apps and Windows Store apps must use RunAsync to execute tasks on a separate thread. The following difference should be noted when processing CoreWindow events.

Activating COM interfaces

Windows Phone apps must use CoCreateInstanceFromApp to instantiate a COM interface. For a list of the CLSIDs that are supported on the phone, see Supported Win32 APIs for Windows Phone 8.