I have to develop an application for windows that will enable controlling the mouse through web cam by recognizing hand gestures. I will be using vc++ 2008 for development. But I am confused whether to go with .NET framework or core win32 APIs. Performance is very important for my application. As per the book "Beginning Visual C++ 2008" by Ivor Horton, there is a small performance penalty associated in using .NET framework. I wanted to know on what all factors the penalty depends upon and will it be feasible to use .NET framework for my application.
The Win32 API (also called the Windows API) is the native platform for Windows apps. This API is best for desktop apps that require direct access to system features and hardware. The Windows API can be used in all desktop apps, and the same functions are generally supported on 32-bit and 64-bit Windows.
NET5 applications can now access Windows APIs through a new set of Target Framework Monikers (TFMs), which have been extended to support platform specific APIs. This is the recommended mechanism for . NET going forward.
Is the Win32 language still in use? Win32 is not a language. It is an API (application programming interface), consisting of a set of functions and data types used by Windows applications. Yes, Win32 is still very much in use every day.
NET Core is faster than . NET Framework because the architecture of . NET Core is written or restructured from scratch to make it a modular, lightweight, fast, and cross-platform Framework. The Applications require technologies like workflow, webforms or WCF that are not present in .
If you are acquainted with Win32 API, then go Win32 API. It is the natural choice in your case since most of your source code will be video capturing, image processing, algorithms, and interfaces to mouse in Windows. When you are interested in performance, be closer to the hardware avoiding thick layers like .NET.
I believe that .NET is for complex business applications not for real-time applications or device drivers.
Unless you are a very experienced C++, programmer, C# is a much more productive language (speaking as someone with over 15 years C++ experience and 2 years C#).
The .Net libraries offer a wealth of high-quality functionality that's easier to use than the standard C++ library.
So, I'd go with using .Net.
I also recommend using C++/CLI to directly call complex native libraries if you have to integrate them, rather than P/Invoke. That's good for odd calls but doesn't let you easily access data structures or mingle native and managed code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With