Does Windows IOT supports CNG/BCrypt APIs?
If possible, I'd like to have some references in case it does support.
It is supported. You can see that API support desktop apps and UWP apps.
But there seems no such UWP sample. You can reference "Encrypting Data with CNG" and "Typical CNG Programming" for desktop and create your own C++ UWP application.
Reference "Developing UWP applications for Windows IoT Core - C++"
Windows IoT Core also supports certain traditional Win32 app types such as Win32 Console Apps. There is an IoT Core C++ Console project template to make it easy to build such apps using Visual Studio.
Related
I'm developing a C++-Win32-app which should be deployed in the Microsoft Store. Unfortunately, since runFullTrustis added automatically as required capability, the program appears in Microsoft Store as follows: "This app can access all your files, peripheral devices, apps, programs and registry.", but I don't need all of those capabilities. Is there any possibility to get rid of the runFullTrust capability or to choose which capabilities are really needed?
If you want to publish the Win32 apps in Microsoft Store, and you must add restricted capability runFullTrust in the manifest.
Only UWP app can be published in the Microsoft Store,if you have an existing desktop application that was built using the .NET Framework (including WPF and Windows Forms) or C++ Win32 APIs, you can several options(Package your desktop application in an MSIX package, Use UWP APIs...) for moving to the UWP and Windows 10. The moved app called desktop bridge apps. You can see more details in document:
Move from a desktop application to UWP
The restricted capability runFullTrust is required for any desktop application that is delivered as an appx or msix package (as with the Desktop Bridge), and it will automatically appear in your manifest when packaging these apps using the Desktop App Converter (DAC) or Visual Studio. You can see this in document:
Restricted capabilities
After building FirebaseCloudMessaging Sample Application on Windows Using Visual studio 2015, Setting appOptions using C++, It says "Initialized Firbase Cloud Messaging" But I don't see FCM token available to communicate.
The Firebase C++ libraries are specifically designed to be used in iOS and Android apps.
The first line of the sample project's readme explains that as:
iOS and Android samples for the Firebase C++ SDK.
And the first line of the documentation of the Firebase C++ SDK:
The Firebase C++ SDK provides a C++ interface on top of Firebase for iOS and Android.
So while the sample apps may compile on other platforms, the underlying infrastructure they need to work is not available on those platforms.
I converted Win32 app (C++) to UWP one successfully.
But it can't work read/write file method, so I want to use UWP API from converted app.
Supported UWP APIs for converted desktop apps
I found this sentence "Most UWP APIs work well on converted desktop apps.".
But I can't find the way to call UWP API from converted Win32 app.
How to call UWP API from converted Win32 app ?
Thanks.
How to call UWP API from converted Win32 app ?
Actually, there are some samples in this offcial repository: DesktopBridgeToUWP-Samples
For example, the AppService Bridge Sample includes two projects: BackgroundProcess(Win32 Console application) and UWP(UWP app)
The BackgroundProcess project added reference to System.Runtime.WindowsRuntime and enable UWP AppService implementation, check ThreadProc function
The UWP project will use the new full trust capability to execute this Win32 application to consume the App service. See also Converted desktop app extensions
But it can't work read/write file method
In your scenario, you just need to complete UWP feature(StorageFile class) in the Win32 project and convert to the UWP app.
We have recently published a blog post about calling UWP APIs from Win32 processes. Those APIs generally can be called even without using the Desktop Bridge, but several are only applicable when using the UWP app model which the Desktop Bridge conversion provides:
https://blogs.windows.com/buildingapps/2017/01/25/calling-windows-10-apis-desktop-application
Thanks!
I would like to access Bluetooth LE devices using the corresponding UWP APIs. However, my application is a "classic" C++ application (3D game) that can't run as a UWP app. Is there a way to do that? Accorind to enter link description here these APIs are published, but I don't know the steps to access them I have only found some posts for Windows 8/8.1 apps that include the Windows.winmd and Platform.winmd metadata files and set the /ZW compilation flag, but this doesn't seem to apply to Windows 10.
You should be able to do this, as the Bluetooth classes (e.g., BluetoothLEAdvertisement) are marked up with DualApiPartitionAttribute (callable from desktop and UWP apps).
Using one of the older Win8.1 desktop samples should give you a good starting point for calling the APIs without requiring /ZW or referencing the winmd files. A good example is the desktop toast API sample.
If you go that route, you can use classic COM to create the UWP/WinRT classes via WRL helpers.
You can use the web that you make a web server and the C++ application use the same server and if UWP send the info to server then it will send the info to C++ application.
To safe,the UWP can't use the desktop app.
The Visual Studio devenv.exe executable is a native program. However, native programs can load the .NET runtime and thereby host Windows Forms and WPF components.
I want to do as Visual Studio How to do it?
This blog post from Microsoft and its associated tutorial demonstrate how to use the new CLR hosting API's to host the CLR within your native apps.
This article also illustrates how to use the new CLR4 hosting API's.
As OP requested: Here's the first article of a series exploring how to host the CLR & WPF in a native app.
Also, here's an article about how to host a WPF control within an VC++/MFC app.