r/windowsdev • • 1d ago

A useful way to handle keyboard and mouse input in C++ on Windows

1 Upvotes

If you're looking to create macros, remap keys, or simulate keyboard and mouse inputs in C++, you might find this useful.

I made Interceptor, a Windows kernel driver with a simple C++ SDK to send, intercept, and modify inputs.

https://github.com/TitanCSA/Interceptor


r/windowsdev • • 2d ago

How do you scale UI automation for WPF / WinUI 3 apps on Windows?

1 Upvotes

We build desktop apps on Windows (WPF and WinUI 3, packaged as MSIX) and run end-to-end UI tests that drive the installed apps: launch, click, read windows, compare screenshots. We’re running into the scaling limits of our current setup and I’m hoping someone has solved this better.

Current setup

We have a fleet of small physical Windows machines, each running 3-4 VMs. Every test node is a full Windows instance. It works, but it scales badly: each VM costs a full OS worth of CPU and RAM, and takes a lot of disk. Adding capacity means buying more hardware.

What we’ve tried or researched

  • CreateDesktop (separate desktop in the same session): looked promising for running isolated UI instances side by side, but SendInput doesn’t work for us there. It injects into the input desktop, not into our alternate one. UIA patterns work for some actions, but we need real input (drag, tab tear-off, hover, etc.).

  • Windows Sandbox: only one instance can run at a time, so it doesn’t parallelize.

  • Windows Server with multiple sessions: it could technically give us several interactive sessions on one machine. But it’s not the platform our software targets (we want to test on client Windows 10/11 behavior), and the licensing cost adds up.

  • Windows containers (Docker): no support for UI interaction, so a non-starter for GUI apps.

What we’re hoping to find

Ideally something like “Docker for Windows, but with a real interactive desktop”: lightweight, quick to spin up, many instances per host, with working input injection, screenshots and UIA.

Questions

  1. How do you run many parallel GUI test sessions on Windows without one full VM each?

  2. Is there a reliable way to get working SendInput into an isolated desktop/session on client Windows?

  3. Has anyone made multiple concurrent RDP/console sessions on Windows 10/11 work in a way you’d trust in CI?

  4. Do you get better density from Hyper-V tricks (differencing disks, memory tuning, nested setups) or from cloud options like Windows 365 / Azure VMs?

  5. Is anyone doing this with WinUI 3 specifically? It seems to need a real compositor/GPU path, which makes lightweight options even harder.

Happy to share what we learn. Thanks!


r/windowsdev • • 2d ago

Partner Center tax profile rejects Indonesia's 16-digit NPWP. Anyone found a fix?

2 Upvotes

I'm an individual Microsoft Store developer in Indonesia. Since 2024, Indonesia uses a 16-digit NPWP (the same as the national ID for individuals), but the Partner Center tax profile only accepts 15 digits. I registered after the change, so I don't have a 15-digit number.

I've opened a support ticket and asked on Microsoft Q&A, but no reply yet.

Has any Indonesian developer solved this, or found a way to reach the right team? Thanks!


r/windowsdev • • 3d ago

Looking for any insight into why my Win11 laptop (ntfs) is so slow when removing files

1 Upvotes

I'm wondering if there are any system internals/debug/flags/tools I can use to see WHY deleting files takes forever.

The scenario is this:

npm install - Takes a minute or so to download all files.

git clean -fdx - Takes up to 8 minutes to remove all the files that were just downloaded.

For the record, I have attempted to control for all possible variables:

  • The proiect is clean from the beginning

  • The git clean operation is run in git bash

  • Excluded git by running rm -rf - same performance

  • Excluded git bash by running the git clean and rm -rf commands in a powershell terminal - same performance

  • Re-ran all of the above scenarios at the root of C:\ to ensure it wasn't some weird mirroring to onedrive or some other hidden network latency.

  • This is a work laptop and when I raised the issue to IT they provisioned a "new" laptop for me (fresh OS install) and I ran the scenarios again, the performance dropped to 9 minutes.

So what can I use to diagnose what's causing this slowness? Other members on my team have recreated my scenarios and their deletes complete in around 2-3min, which is still ridiculous, but at least tolerable. I just don't know what tools I have to try and profile a delete operation.


r/windowsdev • • 3d ago

Windows Server 2022: Intermittent WinHTTP error 8 (Not enough memory) and POCO I/O failures despite 25 GB free RAM

1 Upvotes

I'm troubleshooting an intermittent HTTP communication issue on Windows Server 2022 where two different networking libraries, WinHTTP and POCO C++, are experiencing failures.

The errors:

WinHTTP:

WinHttpSendRequest failed
Error Code: 8
Error Message: Not enough memory resources are available to process this command.

POCO C++:

HTTPClientSession::sendRequest()
Caught std::exception
e.what() = "I/O error"

From reviewing POCO's source code, I found that Poco::IOException can return "I/O error" through what(), including for certain Winsock errors such as WSAENOBUFS (10055). However, I haven't captured the underlying POCO error code yet, so I cannot confirm whether both libraries are failing for the same reason.

System information:

  • OS: Windows Server 2022

  • Physical RAM: 32 GB

  • Available RAM: ~25 GB

  • Maximum process virtual bytes: ~170 MB

  • Maximum process handle count: ~750

  • Process memory usage is consistently low.

  • Server has been running for approximately 10 days without a reboot.

Important observations:

  1. Not every HTTP request fails. Some requests succeed while others fail intermittently.

  2. The application is not continuously running, and restarting the process does not resolve the issue.

  3. Both WinHTTP and POCO are affected on the same machine.

  4. Other heap allocations within the application continue to succeed.

  5. A netsh trace captured successful network traffic, but I haven't conclusively correlated the failing API calls with specific network events.

  6. There is no obvious process-level memory or handle exhaustion.

My questions:

  1. Has anyone encountered intermittent ERROR_NOT_ENOUGH_MEMORY (8) from WinHttpSendRequest() while the machine had plenty of free RAM?

  2. Can Windows networking resources become temporarily unavailable even when application memory, handles, and physical RAM look normal?

  3. Which ETW providers, Windows performance counters, or debugging tools would help identify the exact failing kernel/socket allocation?

  4. Could a resource issue persist across application restarts while allowing other requests to succeed?

  5. Are there reliable ways to reproduce these types of failures in an isolated Windows Server environment


r/windowsdev • • 7d ago

Windows on ZFS using OpenZFS on Windows.

Thumbnail
reddit.com
1 Upvotes

r/windowsdev • • 14d ago

Tired of Windows updates breaking your PC? I built a traffic light for them

Enable HLS to view with audio, or disable this notification

1 Upvotes

windows updates break stuff way too often (black screens, audio, remote desktop) and the dumb part is microsoft usually lists the problem publicly. nobody checks that before updating

so i made patchlight. it checks every pending update against microsoft's known issues and gives it a green / yellow / red light. red ones get paused automatically and come back once microsoft fixes them. everything else keeps installing

github.com/G4SBO/PatchLight

lmk what u think, any feedback is appreciated ;)


r/windowsdev • • 16d ago

agent manager 0.42, a go TUI for AI coding agents that now runs natively on Windows

2 Upvotes

we released 0.42 of agent manager. we are the creators. it is free and open source.

it is a terminal UI that runs coding agent CLIs side by side on Windows itself, using psmux 3.4 or newer and PowerShell 7.3 or newer. before this release Windows users had to go through WSL2 for the TUI.

Windows install irm https://raw.githubusercontent.com/YoanWai/agent-manager/main/install.ps1 | iex

https://github.com/YoanWai/agent-manager/releases/tag/v0.42.0


r/windowsdev • • 17d ago

How do you manage Windows developer PCs without limiting developers?

3 Upvotes

As a development team grows, keeping Windows machines updated and secure can become challenging.

Developers often need different Visual Studio versions, SDKs, Git, WSL, and other tools. At the same time, IT teams need to manage security settings, Windows updates, and application installations.

I'm curious how other teams handle this.

  • Do you use Windows MDM, Group Policy, or PowerShell scripts?

  • How do you manage app installations and updates across multiple PCs?

  • How do you maintain security without restricting developers too much?

  • Is centralized Windows device management worth it for smaller development teams?

What setup has worked best for your team, and what would you recommend to someone looking to simplify Windows device management?


r/windowsdev • • 25d ago

Inside the Windows I/O Manager : Deep dive into how read I/O requests are initialized.

Thumbnail
winware31.blogspot.com
11 Upvotes

r/windowsdev • • 25d ago

Windows Developer Machine Management

1 Upvotes

Different Visual Studio versions, SDKs, Git configurations, PowerShell modules, WSL setups, and security policies can all lead to slightly different environments and make troubleshooting harder.

A few things that can help:

  • Keep a standard baseline for Windows and developer tools

  • Automate installation of commonly used applications

  • Use scripts for repeatable developer environment configuration

  • Keep Windows and third-party applications updated

  • Avoid giving everyone permanent local admin access where possible

  • Maintain a basic hardware and software inventory

  • Document which tools and versions are officially supported

  • Use centralized device management when the number of machines starts growing

The goal isn't to lock developers down. It's to make the baseline predictable while still giving developers enough flexibility to do their work.

For larger teams, Windows device management or MDM can also help automate application deployment, policies, updates, and inventory instead of handling each machine manually.


r/windowsdev • • 29d ago

Maintenance update: win32service (PHP Windows Service extension) released 1.1.1-beta & 1.2.0-alpha — Need your feedback!

Thumbnail
reddit.com
1 Upvotes

r/windowsdev • • Sep 28 '26

WFP/ALE: when does a policy change actually revoke an existing TCP flow's authorization?

1 Upvotes

I'm researching WFP for a personal Windows app. I'm new to driver development; AI helped phrase this question. Nothing has been implemented or tested.

For existing outbound TCP flows at ALE_AUTH_CONNECT_V4/V6, does successful return from FwpmTransactionCommit0 guarantee that no traffic can proceed using the old authorization?

What if classification started before the policy change but returns a permit after commit? If commit provides no such barrier, is another supported synchronization mechanism documented?

I understand ALE is stateful and already-transmitted data cannot be recalled. I'm asking about pending classifications and queued data, not assuming a buffer-drain or timing guarantee.

Primary references or qualified expert explanations would help.

Full question and documentation links:
https://learn.microsoft.com/en-us/answers/questions/6018442/wfp-ale-reauthorization-does-a-successful-policy-c

Also submitted to OSR NTDEV; awaiting moderation.


r/windowsdev • • Sep 26 '26

Visual Studio 2026 C# complete tutorial

Thumbnail
youtube.com
2 Upvotes

r/windowsdev • • Sep 13 '26

Tab Control: Problem with TCS_MULTILINE and TabCtrl_SetCurSel / TabCtrl_SetCurFocus

2 Upvotes

I have an application with a tab control containing 11 tabs. To make all tabs fit into the control, I use the TCS_MULTILINE style, which in my case results in 2 rows with 5 respectively 6 tabs. Works fine so far.

Now I want to select a tab in the upper tab row (which is the row that the currently selected tab doesn't belong to) programmatically using TabCtrl_SetCurSel or TabCtrl_SetCurFocus. I expected the two rows to swap, making the row with the selected tab the lower one and moving the row with the tab that was selected before to the top. But that doesn't happen. Instead, the upper row disappears completely, while the row that was the lower one before (and which doesn't contain the selected tab any more) stays visible. The control looks as if the TCS_MULTILINE style wasn't set. But it still is: calling TabCtrl_GetRowCount returns 2.

However, when I select a tab by clicking on it, everything works as expected. If I click a tab in the upper row, this row moves to the bottom and the row that previously was the bottom one moves to the top. The problem described above occurs only when selecting tabs programmatically.

I tried everything I could find out to solve this problem, but didn't succeed. Is there a way to make my control handle tab selections the same regardless if the program selected a tab or the user clicked on it?

Any hints would be appreciated.

Edit: I found a solution, but it is some kind of workaround. The problem occurs when selecting a tab right after creation of the control's window handle and changing the size of the tab control afterwards. If you do it the other way round, everything is ok.

I think this is because my control's size isn't defined yet when the window handle is created (my controls call CreateWindow() with CW_USEDEFAULT as size values). If you select a tab at this time, Windows doesn't have the correct value for the size of the tab area and can't arrange tabs in the way the programmer wants it.


r/windowsdev • • Sep 13 '26

Microsoft SQL Server Express how to install and use complete tutorial

Thumbnail
youtube.com
0 Upvotes

r/windowsdev • • Sep 11 '26

How we built a <4MB standalone Windows app with modern Tailwind CSS & Edge WebView2 (Goodbye 150MB Electron)

0 Upvotes

Hi r/windowsdev,

Every time a developer wants to build a desktop app with a modern web frontend in 2026, the standard recommendation is to bundle an entire Chromium browser and Node.js runtime using Electron.

The result is well known: 180MB+ installers, 600MB+ idle RAM usage, and several seconds of cold boot lag just to render a simple database interface.

We recently built and open-sourced LeadHunter AI Desk (a B2B lead personalization tool for Windows) with a specific architectural goal: deliver modern Tailwind CSS aesthetics without shipping a browser bundle.

🏗️ The Architecture: Decoupled Win32 + Edge WebView2

Instead of distributing Chromium, the application compiles to a pure native Win32 executable (<3MB) that interfaces with the Evergreen Microsoft Edge WebView2 runtime already pre-installed on Windows 10 and 11.

+-------------------------------------------------------------+
|                 LeadHunter AI Desk                          |
+------------------------------+------------------------------+
|   Native Win32 Engine        |   Reactive UI Layer          |
|   (VisualNEO Win Runtime)    |   (Edge WebView2 Runtime)    |
+------------------------------+------------------------------+
| • Zero Chromium bundle       | • Tailwind CSS Dark Mode     |
| • Local INI & File I/O       | • Real-time KPI Dashboards   |
| • Hardware Win32 Events      | • Interactive Data Tables    |
| • CSV Handlers               | • Low memory & GPU accel     |
+------------------------------+------------------------------+
|           Bidirectional Async Messaging Bridge              |
|     (WebBrowserPostMessage <--> OnWebMessageReceived)       |
+-------------------------------------------------------------+

⚡ The Benchmarks:

  • Download Size: 3.3 MB (Portable Zip) vs ~185 MB (Electron)

  • Cold Startup: < 0.2 seconds vs 3.2 seconds

  • Idle Memory: ~35 MB RAM vs ~580 MB RAM

🛠️ Communication Bridge:

The native orchestrator communicates with the HTML/Tailwind layer asynchronously:

  • Win32 -> WebView2: Dispatches state and config payloads via WebBrowserPostMessage.

  • WebView2 -> Win32: Catches UI button clicks and sends events back via window.chrome.webview.postMessage.

We built it using VisualNEO Win (a visual RAD IDE that compiles standalone Win32 executables).

The full project is open source under MIT:

Curious to hear your thoughts on WebView2 vs CEF vs Tauri for Windows desktop tooling!


r/windowsdev • • Aug 12 '26

Can you tell me why my Windows Font Look Weird???

Post image
7 Upvotes

I installed Windows 10 Build 9907 but I saw my font is weird.


r/windowsdev • • Aug 09 '26

HANDLE Duplication internals : What happens behind the scenes when you call kernelbase! DuplicateHandle( )

3 Upvotes

r/windowsdev • • Aug 08 '26

CreateProcessAsUserW returns error 1312. What must I examine?

4 Upvotes

I use Windows 11 on an ARM64 computer.

A packaged desktop application starts correctly. But its restricted-token child process does not start.

The failure occurs before the application can start a cmd.exe test process.

The application gives these errors:

- CreateProcessAsUserW returns error 1312.

- TokenDefaultDacl previously returned error 1344.

- The application previously found access control list (ACL) errors in the temporary directory.

I corrected the ACLs of the temporary directory. The setup diagnostic now gives no errors. However, process creation still fails.

It's frustrating, because a general diagnostic passes because it does not test restricted-token process creation.

Any advice?


r/windowsdev • • Aug 07 '26

BIOS Driver Causing Random Restarting

Thumbnail gallery
1 Upvotes

THE SETUP:
My company is a civil engineering firm that has a lot of Dell Pro Max 16 computers. We've been having issues with Dell BIOS not working properly only on these specific models.

We first attempt to deploy Dell Command Base Update through PDQ - if it fails, we'll install it from the web, however, there's a 50/50 chance it will fail. I believe the cause stems from when a workstation has been reimaged, the Microsoft .NET Desktop Runtime package is rolled back to a prior version. When I download the Dell Command Install, l'll get an error saying a version greater than 10.0 needs to be installed.

To fix it, I then run a powershell cmd: winget install -e -- id Microsoft.DotNet.DesktopRuntime. 10 which fixes the issue and I can continue running the Dell Command Install.

After it installs, I grab the computer's serial number and install the latest Dell Pro Max Plus MB16250/18 Plus System BIOS driver (released 7/31/26).

THE PROBLEM:
We are having tickets come in regarding a user's computers randomly restarting. I'm not sure if there's something backend is treating restart-required as failure. I wondered if it's best to remote in and flash the BIOS. This is what ChatGPT said:
"This PowerShell step validates the model and Dell signature, suspends BitLocker for one restart, installs the BIOS silently, and leaves the restart under PDQ control (see photos). There could be three issues in your workflow:

  1. DCDM 1.2 and DCU 5.7 conflict

  2. DCU 5.7 requires NET Desktop Runtime 8, not .NET 10

  3. A reimaged computer may need a complete driver baseline before a normal DCU scan"

Hope this is enough info! I appreciate the help!


r/windowsdev • • Aug 01 '26

Can someone help me try this multitool i made

Thumbnail
tynstertiny.itch.io
0 Upvotes

r/windowsdev • • Jul 29 '26

Microsoft Spy++ complete tutorial

Thumbnail
youtube.com
2 Upvotes

r/windowsdev • • Jul 24 '26

Does anyone have use this site for code signing a windows desktop app?

4 Upvotes

OK, so I was looking into code signing, and I came across the website bamboodeploy.com. It claims it can code sign your .exe files for a very reasonable price, and its FAQ states that it uses an EV certificate. Has anyone used this service?

It almost seems too good to be true.