Visual Studio C++/WinRT Core App vs Blank App - winrt-xaml

If you are aiming to write a multi-threaded application with some intensive non-graphics background threads as well as a Direct3D based presentation layer which of the two Visual Studio templates Core App or Blank App is likely to be the better choice.
Given that I'd rather not write my own button/controls it seems like Blank App with XAML and using a SwapChain panel would be the go.
However, the statement "...app directly implementing CoreApplication" intrigues me, what if any are the benefits of directly implementing CoreApplication?

Related

VisualStudio 2019 Performance Profiler showing code as [Unwalkable]

I'm trying to profile an ASP.NET web service on my machine under IISExpress that has an execution stack of
c# for the entrance point to the web service, which calls
c++/cli middleware, which calls
native c++ for the bulk of the execution, which calls
c++/cli & c# for some extra plug-in services that provide a Data Access Layer to the native c++ layer
This is all written in Visual Studio 2019 (C# and C++)
I am trying to profile this in Visual Studio 2019 by running IISExpress and using the Analyze / Performance Profiler to attach to the running process.
I can run my program and execute a http request (exercising my execution stack) successfully, but the profiler will only show
iisexpress
[Unwalkable]
as the two function names that are executed.
Does anybody have experience with getting the Performance Profiler to provide good output in similar circumstances?
I'm also open to other profilers.
I experienced the same thing when trying to profile my desktop application. I had to run it in administrative mode. Then it worked as it should.
I'm getting a lot of value out of Microsoft's free PerfView https://github.com/microsoft/perfview/. Much more functional than any other profiler I tried.

UWP limitations in desktop apps

I know that the new UWP app model has some limitations when comparing to "traditional" Win32 apps.
Let's take Visual Studio Code as an example of a desktop app.
What features of Visual Studio Code were missing or had to be different from user perspective, if it was an UWP app?
EDIT:
I've done exams for microsoft certification "Essentials of Developing Windows Store Apps Using C#" and Exam 70-355: Universal Windows Platform – App Data, Services, and Coding Patterns. So I know something about win rt api.
Please don't bother with answers like "uwp app runs in sandbox". They are useless, because they say nothing about the limitations from users' perspective. I intentionally took real life example, so we can go concrete.
The limitation could be, that your app cannot support 3rd party plugins like custom syntax highlighter or refactorin extension(it was limitation of windows store apps, not sure if its still valid).
Another limitation could be, that your app is not able to take screenshot, because there is no api in uwp for it (not sure it its true, actually)
The phrase "Win32 desktop app" is a ill-defined since the Win32 API programming model has been around since Windows NT 3.1. It can also cover dozens of development languages and UI frameworks over the intervening two decades.
Here's a quick overview of the key UWP differences:
API surface area. The UWP platform supports many but not all Win32 and COM APIs, and introduces new APIs. If your "Win32 desktop app" is using mostly ANSI APIs that date back to Windows 95, then you have a lot of updating to do. If you are using mostly Windows Vista era UNICODE APIs, then a lot of stuff "just works". See Win32 and COM API for Windows Runtime apps (System).
Security context. The UWP platform runs applications in an AppContainer security context. "Win32 desktop apps" on Windows Vista or later run as "Standard User" or as "Administrator". UWP apps have less access rights than "Standard User" and can never run as "Administrator". UWP apps can request additional capabilities to get a few more rights with permission from the user, but have limited access to the system and user data. For example, you cannot read most of the filesystem, only your installed location, an isolated application data folder, and an isolated temporary file folder. See File access and permissions (Windows Runtime apps). This also means UWP apps have limited access to devices. See Device and sensor overviews.
Windows Vista User Account Control that introduced Standard User was focused on protecting the system and other users data compared to the older "everything is administrator" model, but did little to protect the current user's data files since all apps could access or even modify it. AppContainer isolation is protecting both the system and the current user's data and settings. "Win32 desktop apps" were encouraged to install to C:\Program Files which was read-only at runtime and to use application data folders, but they were not required to.
Deployment via AppX. "Win32 desktop apps" use any number of ways of deployment, often something using MSI technology and running as "Administrator". UWP apps are packaged in AppX files and are always deployed by the system. There is no "Custom Install Step", and therefore UWP apps cannot install drivers or services, change ACLs, etc. The system takes care of deploying the C/C++ Runtime (which must be Visual C++ 2015 or later).
Interface model. There is a plethora of interface frameworks for "Win32 desktop apps" like WinForms, MFC, WPF, etc. The vast majority of these are not compatible with UWP because UWP does not support classic Win32 windowing, WM_ messages, or GDI/GDI+. For UWP apps, you can use XAML with C++ or C# code-behind, DirectX (Direct2D and/or Direct3D) with C++ (or C# via 3rd party assemblies like SharpDX), or HTML5 with JavaScript.
Deployment via MSIX.
Answering your question is therefore extremely difficult, if not impossible, without a complete understanding of the product's code base and dependencies.
See Get started with Windows apps

The different between Web Performance Test and App Insight

Currently, I had used WinJS to developed UWP app.
I saw the tutorial of Azure Web Performance Test and App Insight.
I confuse each of them, what are the different of both?
When you create a C# UWP application, Visual Studio has an option to integrate Application Insights for your project.
Unfortunately, you don’t have that same option when using UWP in HTML/JavaScript. In that case, you will have to do all plumbing manually. Microsoft provide a SDK for using Application Insight in JavaScript.
We wrote small a wrapper for JavaScript sdk that adds those metadata and everything starts working fine for HTML/JavaScript UWP apps.
http://mcnextpost.com/2015/10/26/uwphtml-using-application-insights-in-your-windows-web-applications/

Can I embed a windows store app inside a classic windows application?

I would like to embed a universal windows app into a classic windows application on windows 10. Is this possible?
The short answer is no. However... depending on what you're trying to do, the information below may help you.
If you just want to get the look and feel of a desktop application, you should be aware that Windows 10 apps (unlike Windows 8 apps) run in non-fullscreen mode by default, and can be resized. Desktop apps in Windows 10 have top-right icons (min/max/resize) that look similar to how UWP apps look in the title bar and top-right icons.
If you're creating a UWP app with XAML, you won't be able to embed it in a desktop application. However, if you're building a Windows 10 app using HTML5 and JavaScript, you could repackage it inside a browser control embedded in a desktop application.
If you're creating a game using a 3rd-party tool such as Unity, you can export it as a Windows desktop application just as easily as exporting to a UWP app for Windows 10. Unity can be used for non-game apps as well, so you could export it to a desktop application today, and still have the option of publish a UWP of the same game/app.
If you were thinking of accessing the full Windows SDK from you UWP app, you won't be able to do so, as you will be restricted by the UWP sandbox. But Windows 10 has made many improvements in helping you get access to many advanced features, e.g. accessing certain locations in the file system, so you may be able to get by with all that UWP has to offer.
If you want to avoid the Windows Store, you may sideload your app, as suggested by an earlier comment.
Hope that helps! :)

Coded UI Test Project calling from ASP.net Application

Scope : Customize the Coded UI Test Project
Requirement : Coded UI Test project is directly open my ASP.net application.
Open the CodedUITestBuilder recording toolbar when i click on button in my application.
I want to open CodedUITestBuilder from my application via Coded UI Test project.
I tried but not found feasible solution.I am expecting your positive reply.
Thanks in Advance
The Coded UI Test Builder is a tool that is only available within VS 2010 + Premium or Ultimate. The only way to access it would be to do so within a fully licensed Visual Studio instance, so including the technology within your application isn't possible.
This might help you accomplish your end-goal: http://social.msdn.microsoft.com/Forums/en-US/63e71f9e-f318-45bc-9d92-261312d90467/is-there-an-api-or-sdk-for-codedui-test-builder?forum=vsautotest

Resources