How to fix "module was not instrumented." Reason:"path_is_excluded" error in Microsoft.CodeCoverage.Console tool?
I'm receiving the following problem while trying to instrument my dll with Microsoft.CodeCoverage.Console tool. module was not instrumented. Reason: path_is_excluded." I'm using Microsoft.CodeCoverage.A console tool for calculating code coverage.…
How Can I track the Last DPI which is sent by WM_DPICHANGED in WPF?
I want to scale my WPF application according to available screen DPI. I know there Per Monitor DPI aware available but that are completely different what I want to achieve. I want to disable scaling for my WPF application even if windows has some scale…
Disabling autocompletion from anything else than Tab in VS 2022
Although I set "Default IntelliSense completion mode" to Tab-only in Text Editor/Advanced, Visual Studio keeps replacing text as I type with its first suggestion when I press e.g. space or dot. I do not want the editor to ever autocomplete…
How does Windows' 'Game Controllers' properties connect to a joystick?
The situation: We need to use a new game controller (with a joystick only) hardware on Windows 10 IoT. In the properties of "Game Controllers", moving the joystick is visible in the displayed rectangle with the '+'. Our software using DirectX8…
error C2039: 'string_view': is not a member of 'std'
I have installed a fresh VS2022 (community). I created a MFC app, and I compiled and worked fine. I put the following line of code, in a header, lets say class CMFCApplication1Doc : public CDocument: // MFCApplication1Doc.h : interface of the…
System.IO.SerialPort throws System.PlatformNotSupportedException when calling from c++, but not from c#.
I have a perplexing issue with the System.io.Ports package in a Class Library I built using c#/.NET6. I suspect it is a misconfiguration, but I'm not seeing much helpful documentation thus far on StackOverflow. As some background, I must support an old…
How can I get apps on different platforms to communicate?
I wonder if there is anyone out there who can help me with a solution to an application I want to create. This solution will contain two separate platforms, communicating with each other via network, serial ports, or something else. The first platform…
Where to find correct version information using in C on Windows
I'm looking to programmatically find the correct version information for Windows using the "C" programming language. I've searched online with no luck. Does anyone know where I can find resources to help me achieve this goal?
how to reduce size in c++?
I used just one func in lib. but if I do not use this func the size may be 30kb if I use it is 150kb but I just use one not all. the .h file is very big. 331kb how to reduce unused codes? I am creating dll
Get deleted item from recyclebin
Task: I need to get deleted item having SHITEMID data. SHITEMID is defined as: typedef struct _ITEMIDLIST { SHITEMID mkid; }ITEMIDLIST; defined in C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\shtypes.h I have the following code to get…
C++20 Modules in Shared Libraries
Hello, Follow-up question to https://learn.microsoft.com/en-us/answers/questions/1665106/how-to-use-c-20-modules-in-shared-libraries I’ve been exploring the use of C++20 modules in shared libraries and I understand the typical approach involves providing…
Visual Studio 2022- Couldn't install Microsoft.VisualCpp.Redist.14
I'm trying to install Desktop development with C++ for Visual Studio 2022. Attempting to install this using the Visual Studio Installer returns an error stating: Couldn't install Microsoft.VisualCpp.Redist.14 The log file mentions another log file that…
can not use static library (.lib) which is created by .net?
I created static library using .net with publishAOT dotnet publish -r -win-x64 -release /p:NativeLib=Static then I create dynamic library in c++ (.dll) and want to use this library but it seems can not . #pragma…
Documentation clarification for MF_MT_AUDIO_AVG_BYTES_PER_SECOND for AAC encoder
The documentation here: https://learn.microsoft.com/en-us/windows/win32/medfound/aac-encoder States that for AAC encoding the valid values for **MF_MT_AUDIO_AVG_BYTES_PER_SECOND **are 12000, 16000, 20000, 24000. It then says that * 6 those values should…
failed to load dll
but when I register it .and
How to initialize inner class that has a c-tor with more than one parameter
Hi to all, I'm trying to write a simple code and it won't compile! Any ideas? #include <stdio.h> class RegClass { public: RegClass(int param, char * theName) { printf("c-tor (%d,%s)\r\n", param, theName); } }; class Test { public: int…
Direct2D drawing quality is inconsistent
This is the result drawn in the window(HwndRenderTarget) This is the result of drawing in WicBitmapRenderTarget
How to initialize inner class that has a c-tor with parameters
Hi to all, I'm trying to write a simple code and it won't compile! Any ideas? #include <stdio.h> class RegClass { public: RegClass(int param) { printf("c-tor (%d)\r\n", param); } }; class Test { public: int a; RegClass Reg(5); }; int…
Finding window element using MSAA
I'm trying to detect the "Previous" and "Next" buttons of the Spofity MiniPlayer window using MSAA, however, sometimes these buttons don't get detected, I don't understand why, it's like luck, I need to reopen the window uncountable…
How to modify the value of a preprocessor based on the value returned by a command or script?
On visual Studio 2022 how to have a preprocessor value defined based on the result returned by a script? What i tried: Solution Explorer > Properties > Build Events > Pre-Build Event > Command Line > "python script.py >…