I have a Java app that uses a native interface to a C++ module to access native API features. The program is running on a windows 10 tablet computer that has an accelerometer. I want to access the sensor output and pass it to the java program. The windows module is a generic "Win32" module compiled using VC 2015 community edition and the latest windows 10 sdk.
Is this even possible or is the only way through their totally new "Universal App" system that is based on c# .net and xaml "coding" ???
I want subscribe to sensor events and receive callbacks or the tail end of a queue or pipe with the data.
Related
I need to programmatically (c++) start my desktop application once per week. With a parameter, on user context.
In Windows I have implemented this using TaskScheduler. This is close to what I have used: https://learn.microsoft.com/en-us/windows/desktop/taskschd/c-c-code-example-creating-a-task-trigger
I need to add same functionality for osx port. Can someone point to the Api that is exposing this functionality? I am targeting osx 10.12
I have experimented with XAML UI programming using C++ for Windows 8 Store apps. I really like the developer experience, the XAML designer and the fact that I can get pure native apps with a modern rich user interface and high performance.
I want to create similar XAML apps using C++ for Desktop Windows (the non-Store world). How do I do this? For years I have waited for a native UI stack for Windows Desktop which is newer than MFC and somewhat higher level than direct Win32/GDI programming.
Both Silverlight and WPF use XAML along with code-behind to implement apps. Neither are still maintained but if you want to play with the same technology, it's there.
As Jeff McClintock mentioned, Microsoft has announced that a future update to Windows 8 will allow apps to run on the desktop, but I expect that this will merely be a windowing change and the apps will still run in the restricted sandbox that Store Apps run within. Maybe Microsoft will introduce yet another desktop-based UI framework and support it for three years before killing it.
WTL is newer than MFC, although its last update was six years ago. I personally recommend Qt, as it allows access to native Win32 calls (so you can do whatever ganky stuff Win32 apps normally want to do) while still having a rich, robust UI framework to build upon.
A future update to Windows 8.1 will allow Windows 8 Store Apps to run in a Window on the Desktop, and appear on the taskbar like a Win32 Application. This allows Store apps to Act a lot like Desktop Apps. MS have hinted store-app XMAL will be available to Desktop apps at some point in future.
http://www.gottabemobile.com/2014/04/02/microsoft-listens-to-users-start-menu-and-windowed-apps-are-on-the-way/
Codejock has some markup language support in MFC (native C++).
http://www.codejock.com/inc/img/downloads/samples/toolkitpro_markupsample_full.png
What I am looking at is C++/WinRT for native C++ applications that use the WinRT framework for UWP apps, at least for Windows 10. See C++/WinRT in the Microsoft Dev Center for a starting place.
C++/WinRT is an entirely standard modern C++17 language projection for
Windows Runtime (WinRT) APIs, implemented as a header-file-based
library, and designed to provide you with first-class access to the
modern Windows API. With C++/WinRT, you can author and consume Windows
Runtime APIs using any standards-compliant C++17 compiler. The Windows
SDK includes C++/WinRT; it was introduced in version 10.0.17134.0
(Windows 10, version 1803).
The intro article in the series goes on to say:
For authoring and consuming Windows Runtime APIs using C++, there is
C++/WinRT. This is Microsoft's recommended replacement for the Windows
Runtime C++ Template Library (WRL) and C++/CX.
I first got started with UWP apps for Windows 10 using C++/CX which uses the Microsoft Visual Studio C++ extensions with ref and all of the C# like extensions for C++ in a .NET world.
I am now working with Visual Studio 2017 and the C++/WinRT framework which uses native C++17 features along with an SDK. I believe you can also use C++/WinRT with Visual Studio 2015 with the latest updates, update 3.
There is also a package available from Extensions and Updates within Visual Studio, C++/WinRT, which contains a couple of Visual Studio templates for a couple of different application types.
C++/WinRT seems to be a work in progress. It seems best if you are using Visual Studio 2017 with the latest Windows 10, Version 1803, which contains the SDK and the XAML editor works fine. I have had problems with the XAML editor with an earlier build of Windows 10 Enterprise at work (IT Services maintains its own update servers and is a couple of builds behind the bleeding edge).
See also my question synchronizing SDK with Windows 10 update and using WinRT with Standard C++ which has an updated version of a test program from this article, C++ - Introducing C++/WinRT.
I need to develop common UI which will run on both desktop and metro.
Is this possible.I wanted to use same code for UI both in desktop and metro app
I know that Win RT is Supported on both desktop and metro.
I believe your question is about creating an application that works like both Metro Style and also as a traditional desktop app. What you need to do is to wrap all your business logic code into a WinRT DLL and create two different UI applications one using XAML and another using windows Form and consume the DLL.
But ideally you cant have a single exe that runs like a native app and a metro style app, you should have two exe's.
Another thing is the native app which you develop in this manner may not be backward compatible because in build conference i remember them saying WinRT is only from Windows 8 onwards. so you cant run your native app in Windows 7.
I'm going to write an application for iOS, Mac OS X and Windows Phone 7.
To minimize the amount of work, I'd like to write the model only once, in C++ (otherwise I'd have to do it twice; in Objective-C and in C#).
Can I use C++ in a Windows Phone 7 application, together with C#?
No you cannot use C++ for WP7 apps. However you might be able to use Monotouch to write some shared code in C# between the 2 platforms.
Taken from here: Windows Mobile 7 and C++
All Windows Mobile 7 (now called Windows Phone 7 ) development, at
least initially, will be in managed code. Development using native
languages like C/C++ is not supported for third parties. You can
develop apps and games for Windows Phone 7 using the Silverlight or
XNA framework, and the initial release supports only C#, VB support is
supposed to be coming out soon.
It's from June 2010.
How should an application that uses the Volume Shadow Copy service be built for release? I've been building and testing in Windows 7 and everything looks good so I built the app to test in Windows XP and I get an error on startup:
The procedure entry point VssFreeSnapshotPropertiesInternal could not be located in the dynamic link library VSSAPI.DLL
Now, I realise that a way round this is to use LoadLibrary and call the function if it exists but surely the function should exist in the first place to be able to use VSS?
I read somewhere that I would need to build a different version for XP, Server 2003, Windows 7 etc but I've not seen that in other applications that use VSS.
What is the correct way to build a VSS app?
Thanks,
J
Take a look at HoboCopy source code.
This should answer every question you could have.
It's free (for personal use) and C++ src code covers all Windows versions from XP to 2008.
Src has moved, anyway start from here.
Note: The Windows SDK can be used to develop VSS applications only for Windows Vista and later Windows operating system versions. It cannot be used to develop VSS requester's, providers, or writers for Windows Server 2003 R2, Windows Server 2003, or Windows XP.
link: VSS Application Compatibility (Windows)