There is a red wavy line but there is no error. Bug or settings?
void ff(int* p) { std::cout<< *p; }; void ff(unsigned int i) { i++; } void func(void (&&fp)(int*)) { int i = 6; fp(&i); } //no other overloaded versions of func ...... func(ff); I compiled with no error or warning, but there is a…
failed to load dll in native c++ IIS module?
I am trying to create c++ Native Module. url but when I register it .and start the web the AppPool Stopped.
How to Detect Initial DPI changes in a WPF Application while Scaling according to Per Monitor Aware in Variable Dynamic Screen Resolution?
In daily life we have to deal with a lot of different types of display size it may be mobile or may be a 4k monitor. The screen resolution vary from display to display. Here another important factor is DPI (Display per inch) which is mainly a scaling…
C++ Inner class construction problem
Hi to all, I can't figure out what is the problem with the following simple C++ code! the inner RegClass class within Test class won't construct. Any ideas? #include <stdio.h> class RegClass { public: RegClass() {…
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…
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…
Direct2D drawing quality is inconsistent
This is the result drawn in the window(HwndRenderTarget) This is the result of drawing in WicBitmapRenderTarget
How to Utilize SetColor(Windows::UI::Colors::Red) from a Non-UWP and Non-C++/WinRT DLL File
Hi, I have developed a C++ DLL without utilizing UWP or C++/WinRT. Within this DLL, I am employing Windows::Devices::Lights::LampArray^ lamp to retrieve information about the lamp, such as lamp->IsConnected, lamp->LampCount, and…
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.…
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 >…
Why isn't my c++ dll properly loading into my c# exe?
I'm continually getting this error message but I can't find the source. Here's a link to the .dll class I want to utilize: link And here's the c# class I'm calling it from: link
Sending PCIe Message TLP (Vendor Defined Message) from windows Kernel mode driver
Hi, I'm trying to write a custom driver on windows 10 (with KMDF) to frame & send PCIe TLP packets to PCIe EndPoint with user-defined payload. I'm able to do PCIe CfgRead, CfgWrite operations with READ_REGISTER_ULONG and WRITE_REGISTER_ULONG APIs.…
Control Flow guard
Hello Team, Control flow guard is only for visual c++ based application or for all c++ compilers or it will works for all like c#, .net based application.
Problem signing a hash using the Wincrypt lib
Hello devs. I need to read the user certificates installed in Windows and use them to make a signature in a hash of a file previously calculated in sha256 with the private key of the chosen certificate. To do this, I developed the following code inspired…
Not able to send email from Outlook 365 (both old and new outlook) using Full MAPI in C++
We have an application which has option to send emails through Outlook with the option of using either Limited MAPI or Full MAPI. Till now it worked smoothly for all the cases. But we started facing problem after introduction of Outlook 365. Sending…
MAPIInitialize() fails with MS outlook 365
Hi I have an VC++ application which reads the emails from the MS outlook. Till now it was working fine till I was using MS outlook 2019/2016. But as soon as I upgraded my outlook to office 365 app, my application fails with outlook. below is the code…
How to use c++ 20 modules in shared libraries ?
Hello everyone, I am currently working on a test-project where I want to use shared libraries and I would like to leverage the new C++20 modules feature. However, I am having some difficulty understanding how to properly set up my code to use C++20…
NotifyIpInterfaceChange function (netioapi.h) does not notify on manual DNS changes
I work on the c-ares open source asynchronous DNS library (https://c-ares.org) and we have recently added automatic configuration reloading when we detect a network configuration change has occurred. We get notifications properly when network…
How to diable keyboard
I want to disable keyboard using toggle switch and these are my code I don't know what the command is to disable keyboard using toggle Switch. please help me I am beginner in Win UI (C++/CX & C++/WinRT). <! --xaml --> <ToggleSwitch…