C++ animate anything correctly
I want to understand how to correctly display something in win32. For example, how to make a square that will move with sin() up and down, so that it is correct and not as I did it through CreateCompatibleDC and create a Bitmap and then move all of it…
Issue while Writing\Updating .ini files using RegSetValueEx\WritePrivateProfileString
I’m encountering an issue while updating an INI file. Initially, I attempted to write the value to the registry and then update the INI file using the RegSetValueEx() WinAPI. Although the function executes without returning any errors, the value is not…
why use SetupDiGetDeviceRegistryProperty get SPDRP_CLASSGUID always return the same id
I use the following demo to simultaneously obtain the instanceId and guid of the device, but on my computer, all devices obtain the same SPDRP_CLASSGUID value. Why is this? int main() { HDEVINFO hDeviceInfoSet =…
Windows Function to get network related details.
Hello Folks, I am looking forward to implement Windows Functions to print the following windows server's network related details. all network interface name, type, ip dhcp, mtu, ip address, ip cidr, default gateway address and matrix, hardware address…
Choosing Between GetAddrinfoEx and DNSQueryEx for Efficiently Resolving Multiple IP Addresses from Hostnames
Hi everyone, I’m working on a project where I need to resolve hostnames or Fully Qualified Domain Names (FQDNs) to a list of IP addresses. The use case involves resolving a hostname to about a dozen or two IP addresses, and I’m evaluating which function…

Question about Using SetFileCompletionNotificationModes with IOCP in Non-blocking Winsock Operations
Hello everyone, I'm currently working on a project where I am using WinSock to create both UDP and TCP sockets. The sockets are set in non-blocking mode using ioctl, and I am using overlapped operations with an I/O Completion Port (IOCP) to handle…
VS2022 Resource Editor Problems
I've been following through the Microsoft Learn documentation for Getting Started with Win32 and C++ but I've run into a lot of problems with the resource editor in Visual Studio 2022. (…

How should we manage the Memory of the parameters passed by OS in WindowProc
Hi, Im working in Win32 desktop application in cpp. When a Window Proc is triggered with some WM_* msg, We may receive some LPARAM and WPARAM data. These parameters are different concerning the MSG passed. This can hold variable-length data like pointers…
How can I create a Gaussian blur with a printer render target using Direct2D?
I am using Direct2D to generate diagrams. I want to create a glow-effect around diagram boxes, using Gaussian blur. In order to do this, I paint a rectangle to an off-screen render target, blur it, and then get the off-screen render target's bitmap and…

How to create a shell extension using IExplorerCommand for Windows 11, 10, 8, and 7?
After reading Microsoft's documentation, Raymond Chen's blog, NanaZip implementation, and TortoiseSVN/TortoiseGit implementations, I created a "modern" shell extension implementing IClassFactory, IExplorerCommand, and IObjectWithSelection. …
How to find the Boot Volume GUID using Windows APIs?
I am quite new to Win32 programming. Pardon me for any mistakes in the question. I am trying to get the GUID of the Boot Volume of the system of which I have device path which I found by querying the BCD device path through registry function. I tried to…
Windows 10 - What do the individual parts of the game controller calibration values in the registry represent?
Greetings! I am running Win-10 pro. I have a Saitek X52 joystick game controller that has a problem with the "twist" (rudder) axis where it doesn't show the full range of values, and the "center" is offset to the left of center. (I…
How do I filter GPUs by type in DXGI (integrated vs dedicated device)?
Hello! I have written an extension for the Elgato Stream Deck using C++ and Microsoft DXGI (available here) that queries the utilization of the user's GPU and displays it on the Stream Deck. I need to be able to filter out integrated GPUs and only…


where can I find Cardmod.h (part of CPDK)
When reading the Windows Smart Card Minidriver Specification, I have found multiple reference to the header files from Cryptographic Provider Development Kit. When looking at the code of the Estonian card minidriver,…
WSUSSCN2.cab file for Windows 11
I have been using a the wsusscn2.cab file and WUA in a script for years to determine the latest non-superseded applicable UpdatesIDs so that I can download them and bring them to my offline networks. Now that we are moving to Windows 11 it seems to me…
Issues with Custom Page Size on OKI MICROLINE 8480FB Using Windows API and C++
I'm working with the Windows API in C++ to set a custom page size for a dot-matrix printer (OKI MICROLINE 8480FB). I successfully configured the page size to 16 inches in width and 21 inches in height. Using this setup, I can print content at the…
Changes to SEH on Windows 11 24H2 causing problems
Our Fortran Win32 system has been around a long time. One thing it does is when a calculation underflows it can truncate to zero immediately. The advantage is that the value doesn't continue to lose precision which is important for some calculation. To…
About DhcpGetClientInfoV6 function in dhcpsapi.h
When I used the DhcpGetClientInfoV6 function in dhcpsapi.h, it returned code 2. After searching, I found the content, but I couldn't understand it. $ .\Err_6.4.5.exe 2 # for hex 0x2 / decimal 2 BTH_ERROR_NO_CONNECTION …
NetWkstaUserEnum is bugged, it is impossible to use resumeHandle
Referring documentation: https://learn.microsoft.com/en-us/windows/win32/api/lmwksta/nf-lmwksta-netwkstauserenum Steps to reproduce the bug: you need a server with many simultaneously concurrent logged users call NetWkstaUserEnum, with prefmaxlen…

How do I reduce the initial distance threshold for Interaction Context manipulations?
In the application I am developing, the interaction context callback that I have registered is not being called until the finger that already has contact has moved too many pixels. Basically, this causes a big jump. I'm not sure how to reduce this, or if…