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…
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…
How to send PCIe Message TLP (Vendor Defined Message) from 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.…
Why do I get this error when I run my project as a .DLL but not as a .EXE
I've got a .dll project in which I'm utilizing Direct 2D to draw on a window. For some reason, one line is continually giving me errors when I attempt to run it: // Create a Direct2D factory. hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED,…
Why is my panning in Direct 2D drifting at the edge of the window?
I'm going through a windows tutorial for Direct 2D drawing a small picture on a render target and I decided to try to add pan and zoom capabilities. All is working mostly fine but I'm having an issue with the pan. My is supposed to move in sync with…
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 code "exited with code -1073741819"
I copied my C code from one window and paste it to another window of VS2019, then i debugged the program and i got the message "Test.exe exited with code -1073741819". I am unable to run the program so please help me out.
How to use DrvDeviceCapabilities in winddiui.h (WITH winspool.lib added but LNK2019 unresolved external symbol STILL occured )
Function DrvDeviceCapabilities(winddiui.h) should be used if I want to identify a printer's color capability according to this link. But there is always a link error (LNK2019 unresolved external symbol ) though I added winspool.lib to Library Directories…
Cannot find how to get to this "Project Defaults" section "in the General pane in the Property Pages."
On this page in the documentation, it describes a "Project Defaults" section on some ephemeral "Debug Property Pages" page in some properties setting dialog, shown below: However, the documentation gives no explanation…
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.
Database credential saved in memory.
Hello team, While testing thick client application. I dumped the memory from task manager and process hacker tools and I got database credentials. So How can I mitigate this issues in C++, C# and .net application. Please suggest and explain in details so…
Mitigation for Dll hijacking
Hello Team, I found dll injection in c#, .net and c++thick client applications. So what will be the standard mitigation to prevent dll injection. Please explain in details so that we can mitigate properly C#, .net, C++.
setting visual studio variables, such as VC_LibraryPath_x64 (AGAIN)
I asked this question previously. I received two replies, both of which suggested that the poster had not carefully read my question (and one of which provided incorrect and irrelevant feedback). So, I am reposting. To be clear. A) I have never…
Visual Studio 2015 & 2017 doesn't recognize std
Hello, I've written simple piece of code which compiles and works perfectly on any other program which can compile and run C++, but when I try to run it from VS 2015 on my laptop or on VS 2017 from my other laptop, it won't build it - I get an error…
[Asan] Getting assert on launch of application "The application was unable to start correctly(0xc0000142). Click OK to close the application."
[Asan] Getting assert on launch of application "The application was unable to start correctly(0xc0000142). Click OK to close the application." Assert Image mentioned below: image_assert.png Resolved Call Stack mentioned in Microsoft Visual…
The QueryVirtualMemoryInformation function fails in 32-bit mode because the WIN32_MEMORY_REGION_INFORMATION structure is defined incorrectly.
For the record, I have Windows 11, "Version 10.0.22631 Build 22631". The WIN32_MEMORY_REGION_INFORMATION structure is defined in "memoryapi.h" as the following: typedef struct WIN32_MEMORY_REGION_INFORMATION { PVOID…
How to detect scale factor in Windows 10 in C++
I am trying to detect the display scale factor in Windows 10 in C++. Below is the code I am using. //Code to detect scale void getDisplayScale(double &h_Scale, double &v_Scale) { //auto activeWindow = GetActiveWindow(); HWND…
Device Manager does not show 'Bus Reported Device Description'
Hi, i need the device description for my APP, but unfortunately appropriate API calls does not return anything and by investigating the device manager it does not show up either. I am searching the USB enumeration list until the correct vid pid and a…
Windows API's CreateFile with CFile gives invalid path error if used drives created with SUBST
A drive is created for a folder using SUBST command. We have a Windows application which reads contents of the and performs some operations. Application does not give any error when read the file path is from actual drive. But when try to read from drive…