What are different error cases in Win32 APIs
Hi, I'm working on Win32 desktop application in CPP. I'm trying to find all the error cases where a Win32 API can fail. But the documentation does not give us a clear information when can a particular API fail. It just tells to get the error status with…

How to communicate with the SIM card in the external SIM card slot of the surface pro9 device?
I want to use the surface pro9 device to access the SIM card in the external SIM card slot. After inserting the card, the device can log in to the 5G network. In my application, I can list Microsoft UICC ISO card readers. Resetting can return the correct…
why uiautomation findFirst is slow and can i correct it?
Hello, I want to find some ui elements in windows apps but when i find it using uiautomation findAll or findFirst it slows down programs. I undertand that there are many elements in ui and it requires going throug many elements but for example in…

shader model 6.7+ failure
Nvidia RTX 3090 documentation states that it supports HLSL shader model 6.7 but it fails in VS22(GDK PUBLIC) with the latest game ready driver. I shouldn't need to enable dev mode in windows should I? I get this during debug: ERROR: Shader Model 6.7 is…

Win32 context menu items issues
Hello everyone, could you please tell me what can go wrong with getting context menu items via win32? First of all, do I understand correctly that the ampersand in the name is normal? But at the same time, some elements have a localized dwTypeData, some…
How customdrawed content could make treeitems draw rectangle to fit them
I tried to reproduce in assembly one of MS official examples related to custom draw technology. from page About Custom Draw from sample SAMPLE: CustDTv Illustrates Custom Draw in a TreeView (Q248496) for now aloowed at github so here is code(language:…
SetSystemCursor not honoring cursor size
I'm currently trying to set the system cursor to loading cursor while I'm processing certain information on my software then restoring the default cursor. But I'm facing an issue when my computer accessibility configuration has the size of mouse computer…

How to enable the accent border instead of the title bar when enabling mica effect?
I have enabled the "Display accent color on the title bar and window borders" option in Windows settings. I applied the Mica effect to my Python program using the Win32API. The window display effect, the window Style viewed with Spy++, and the…
How to run the Windows Function Example Codes independently?
I am not able to test and run the sample exemplary code of IP adapter address or for that reason any other exemplary sample codes of Windows functions. How can I independently test and check if this code helps me to get all the required information which…
Disabling or detecting the use of Desktop Duplication API
We provide software that locks down devices in order to ensure the user remains within our application, and that they don't have access to any outside resources. One class of software that we block is remote desktop clients. We block this through several…
How to fix graphic artefacts in this example
Theory: In this example present implementation of adding linenumbers subclass of standard EDIT control. linenumbers are sent to NC area of control, creation of NC area reached with handling WM_NCCALCSIZE message and adding 40 to left field of first RECT…
Using C++, I want to remove (not deny) Write permission alone from a user trustee with Full Control permission in Windows NTFS Folder.
I want to implement a C++ program that removes the "Write" permission alone for a user trustee with "Full Control" permission over a folder on a Windows NTFS drive. I tried to use the SetEntriesInAcl() function from the aclapi.h…
How to register your app in the Notifications and Actions Center of Windows 11
I am developing an app (it's a normal GUI app written in DART and C++). It is NOT a packaged UWP app. I am able to show the app's item/entry in the Windows 11 Notifications and Actions center by writing this .iss innosetup script: [Registry] Root: HKCU;…
Refresh rate control on IDXGISwapChain1
I play video on my application on xbox with 120Hz, but it seems to be played with 60Hz. Interval between time samples is ~16ms instead of 8ms. I checked few different videos with different fps and the result is the same (I thought that the problem is…

Where are the Samples for TAPI in the SDK as referred to in Learn. Code for C & VB etc.
Hi, Have installed the SDK, every single option ticked. I think had most before as was using Visual Studio before. As below, looking for TAPI Programs as mentioned on https://learn.microsoft.com/en-us/windows/win32/tapi/tapi-quick-start Specifically VB…

I want to disable/enable usb and HDMI port whenever my c# wpf (.net Framework 4.7.2) app runs.
Online resources are not present for above queries. I want solution for both admin/non-admin user account. Please help to provide me the solution.
Why GetBestInterfaceEx doesn't consider routes added via command line?
Consider the case where there are two network interfaces connected to the system (Ethernet and WiFi). Both will add 0.0.0.0/0 route in the routing table but, one of the interface will have a lower metric (say Ethernet gets the lower metric).…
SetSystemTimeAdjustment disable clock adjust rather than changing the RTC clock rate
I need to override w32tm to adjust the DateTime clock-rate in C#. When I call the kernel32 API: SetSystemTimeAdjustment(ref dwTimeAdjustment, ref bTimeAdjustmentDisabled); I get a return of true, indicating it worked, but when I read back the…
OpenEventLog returns RPC_S_SERVER_UNAVAILABLE on Windows 24H2
We have a tool that parse data from the eventlog. However this has stopped working to access remote servers when run Windows 24H2 machines, with either of the following errors: RPC_S_SERVER_UNAVAILABLE RPC_X_BAD_STUB_DATA The following application…
IUpdate2::CopyToCache method Windows 11
It seems that this method no longer works on Windows 11: https://learn.microsoft.com/en-us/windows/win32/api/wuapi/nf-wuapi-iupdate2-copytocache Interface not registered Do you have an idea?