/r/windowsdev

Photograph via snooOG

This a Reddit for highly technical questions and discussion about

development for Microsoft Windows platforms, Microsoft Windows related platforms such as .Net.

A Reddit to ask technical questions about Windows Development

At the core of Universal Windows Platform is the idea that users want their experiences to be mobile across ALL their devices, and they want to use whatever device is most convenient or productive for the task at hand.

Build Windows apps now. Windows 10 makes it easier than ever to develop apps for the Universal Windows Platform with just one API set and one app package to reach all Windows 10 devices – PCs, tablets, phones, and more.

Get Started now!

  1. Get Visual Studio
  2. Learn to develop Windows Apps
  3. Publish to the Windows Store

Read more on developing great Windows Apps.

/r/windowsdev

1,678 Subscribers

2

What is official state on signing of UWP apps?

So, do i understand it correctly, that you don't need to pay for code signing certificate from an identity validating organization, if your app is UWP of a type, and you pay for MS developer account and link your Visual Studio to it? It is technically done so Visual Studio handles signing transparently for you, using some MS own certs or app is processed after being uploaded to Microsoft?

UWP app can be alternatively packaged in MSIX package and deployed without store - this will need you to sign package with some sort of EV cert or there is an option for warning during installation or sign with cert from local PKI like ADCS?

Is there a MS Learn page specifically about it?

3 Comments
2025/01/31
13:55 UTC

1

Admin Privileges for ReadProcessMemory not working as expected

I have an application that I am using as an example of reading memory from other processes for a class that I'm teaching. I am using the windows API function ReadProcessMemory to read the hit points from a video game running in another process. This program is built in C++ using Visual Studio 2022 as a console application and has an openGL window / ImGui interface.

In order to do this, the application must run in admin mode as it needs privileges to read from the other process. However, when I do the following to run it as admin, it does not work:

  • Right click exe and Run as Administrator
  • Create a shortcut to the exe to Run as Administrator
  • Change the properties of the exe to Always Run as Administrator

The only two ways I can get it to run with the proper privileges are:

  • Open Windows Terminal as Administrator, then run the exe from the terminal
  • Open Visual Studio as Administrator, and then build/run the program from Visual Studio

Using these last 2 methods, the program properly displays the hit points from the other process as expected. But not the first 3. I am not sure what the difference is.

I have spend about 10 hours on google and chatgpt trying to figure out why this is the case. I just want a way to be able to run this program as admin without requiring be opening another separate terminal or visual studio.

Can someone explain to me what is going on here, and why "Run as Administrator" has different properties than running it in an admin terminal?

Might it have something to do with the fact that this is a "console application" that opens a console as well as an opengl window?

Thanks for any help you can provide

1 Comment
2025/01/24
19:49 UTC

2

Windows Guard Pages

Hey yall, I’m new here and hope to learn a lot!

I’m here asking about resources on Guard Pages? Specifically how one can use a VEH to handle execution after an blocked access to a page…

3 Comments
2025/01/18
19:07 UTC

3

Pre-Configure High DPI Settings for App?

In Windows 11, when a user has multiple monitors, and the main monitor is not high DPI, when one moves my app to the high DPI monitor, the UI is *tiny*.

One can manually configure the app to render more-or-less correctly on the high DPI monitor:

Compatibility Configuration 1

Compatibility Configuration 2

Is there any way that I can ensure that my app automatically gets this configuration? It has an install, if it needs to install some sort of Windows configuration.

Thanks!

Eric Terrell

https://www.ericbt.com/vault3

https://github.com/EricTerrell/Vault3.Desktop

2 Comments
2025/01/15
15:58 UTC

3

Code sign Windows desktop app using a trusted CA

I'll be making my client's app available on their website for anyone to download, so I know I need to code sign the app and the installer with a certificate from a trusted CA.

But I'm unclear

  1. whether I need an Organization-level certificate or an EV certificate;
  2. whether I need to use one of the high profile (high cost) providers like DigiCert, Sectigo or GlobalSign;
  3. whether to go the hardware dongle route or cloud-based route (given I manually build periodically, not CI/CD).

I'm looking for advice from devs with experience. Thanks for your help!

4 Comments
2025/01/07
11:54 UTC

0

Do GUI apps run on Windows Server Core 2022?

0 Comments
2025/01/02
14:15 UTC

2

Question

Hi there , can anyone here tell me there is any website or platform where i can sell programming stuff related to windows api and os level and so on, or work online or something

1 Comment
2024/12/26
17:57 UTC

5

How do you learn about the windows system?

I have been trying to develop a project in c++ that will basically be my own translucentTB because I don't particularly like translucentTB and it would be a learning experience. And I have no clue where to go from here. I have tried to find out how it works, how the taskbar works in windows but I can't really find anything. So how do you guys find information about things like how the taskbar is actually part of windows explorer, the name of the window and such. I have tried looking through the windows docs, every single place I can find that seems relevant to what I'm trying to do but no I can't really find anything. So any information about this would help a lot!

3 Comments
2024/12/20
15:45 UTC

2

I want to embed or develop a 2D game in a Windows desktop application using C++.

Hello everyone,

As the title suggests, I’m looking for the best approach to develop a 2D game in a desktop application or to embed one. I’m not exactly sure of the best way to go about it.

What do you think is the best approach in C++?

I don’t want to reinvent the wheel by creating a new game engine from scratch. I’d much prefer to use an existing engine or framework.

1 Comment
2024/12/19
10:30 UTC

2

Any dev ready to write a fix for the scrollbar snapback 'bug' ?

Hi all devs,

re: the very frustrating scrollbar 'snapback' effect (bug or feature ?) which affects every version of Windows afaik, and which was discussed here:

https://www.reddit.com/r/Windows11/comments/1dquuq4/is_there_a_hack_to_disable_scroll_bar_snapback/

https://www.reddit.com/r/Windows10/comments/jtahh0/how_to_stop_scrollbar_snapback_in_windows_10/

https://ux.stackexchange.com/questions/55623/why-do-scrollbars-revert-to-original-scroll-distance-when-mouse-is-dragged-sidew

https://www.red-bean.com/kfogel/ms-scrollbar.html

https://www.osnews.com/story/22601/windows-scrolling-behaviour-really-really-annoying/

...considering that strangely I have yet to find any third party tool, 'patch' or 'hack' to fix it, and considering that all Windows developers of similar 'hacks' and which I contacted never cared replying to my messages, I am kindly asking here if there is any developer who is capable of writing such a fix. As a premise, I am a coder but I am not experienced with Windows tweaking/hacking and I don't know such Windows 'internals', so I could never do this job. However, my guess is that one should take the relevant system dll which contains the code for the standard scrollbars (ps. which dll ???), perform some minimal rev-eng and write a patch or function replacement. Ideally, the scrollbar position should be simply *clamped* between zero and its maximum.

Anyone capable of doing this job ? :)

2 Comments
2024/12/13
23:52 UTC

0

MacBook air M1 (mid-2012)

When i installed windows 10 in macbook air m1 (mid-2012) After in work and i connect the internet the screen becom block can any one help me .

0 Comments
2024/11/30
15:13 UTC

3

Seeking Feedback: Open-Source Solution for Stable Audio Device Identification on Windows

Hello everyone,

I'm working on an open-source project to tackle a common issue with Windows audio devices, and I'd love to get your feedback.

The Problem:

As many of you might have experienced, Windows assigns device identifiers and friendly names to audio devices that can change unexpectedly. These changes can occur due to updates, driver reinstalls, hardware modifications, or even simple reboots. This instability causes several issues:

  • Configuration Loss: Applications lose track of the user's configured audio devices, requiring frequent reconfiguration.
  • User Frustration: Users with multiple audio devices have to reset their preferences across various applications.
  • Inconsistent Behavior: Applications may default to incorrect devices or fail to function properly if they can't find the configured device.

My Proposed Solution:

I'm developing an indirection layer that provides stable, user-defined identifiers for audio devices. Here's how it works:

  • Stable Identifiers: Users assign custom, meaningful identifiers to their audio devices (e.g., "My Studio Microphone," "Gaming Headset").
  • Mapping Mechanism: These stable identifiers are mapped to the underlying Windows audio device identifiers.
  • API Access: Applications interact with this layer through an API to:
    • Retrieve the stable identifier for a device.
    • Resolve a stable identifier to the current Windows device identifier.
    • Receive notifications if a device mapping changes.
  • Centralized Management: If a Windows device identifier changes, users update the mapping once within this application. All integrated applications automatically reference the updated mapping.

What I'm Looking For:

  1. Existing Solutions: Are you aware of any existing tools or libraries that offer similar functionality? I've done some research but haven't found a solution that directly addresses this issue.
  2. Feedback on the Idea:
    • Feasibility: Do you think this approach is practical within the Windows ecosystem?
    • Potential Challenges: Can you foresee any technical hurdles, especially regarding Windows audio APIs or performance considerations?
    • Usefulness: Would this be something beneficial to you or applications you develop?
  3. Collaboration and Interest:
    • Developers: If you're interested in this project, I'd welcome any collaboration or insights.
    • Application Integration: For those maintaining audio applications, would you consider integrating such an API?

Why This Matters:

By providing a stable way to reference audio devices, we can:

  • Enhance User Experience: Reduce the need for users to repeatedly configure their audio settings.
  • Improve Application Reliability: Ensure applications consistently interact with the correct audio devices.
  • Streamline Support: Decrease support requests related to audio device configuration issues.

Next Steps:

I'm currently in the planning phase and aiming to:

  • Develop a prototype of the application and API.
  • Open-source the project to encourage community involvement.
  • Provide documentation and examples for easy integration.

Your Input Matters:

Your expertise and experiences are invaluable. Any suggestions, critiques, or pointers to existing resources are greatly appreciated.

Thank you for your time!

2 Comments
2024/11/26
23:14 UTC

2

If you need an .ico file for your app I made Simple Icon File Maker to do just that

1 Comment
2024/11/10
00:00 UTC

1

Access Microphone Indicator by USB?

Anyone know how to access system state for the microphone indicator, ideally via USB? I'm pretty new to this; I've built input devices, but now I want to get information out and I'm not sure how to do that. Any advice would be appreciated.

This handy indicator appears in the taskbar when an app is using the microphone and says whether or not it's muted.

0 Comments
2024/11/06
13:55 UTC

1

Command for getting the current system date format

I'm trying to determine the current system locale date format so I can format the dates correctly for the schtasks-create command.

Is there a cmd or powershell command that can get me this info?

https://preview.redd.it/kg82v01iu0zd1.png?width=880&format=png&auto=webp&s=06920c69d6c8aa3388667fd04179ec5be86621f0

2 Comments
2024/11/05
05:49 UTC

3

Windows application

Hi everyone,

I’m working on creating a Windows application that includes both WPF and a background service. However, I don’t have prior experience with Windows development, so I need guidance on how to enable communication between Windows service technology and WPF.

Additionally, I’m new(#noob) to Windows development. Could you recommend any tutorials or books that would be helpful given my current level?

3 Comments
2024/10/27
12:53 UTC

1

Installing a windows service on a remote server

Hi guys,
Me again. I asked a couple of weeks ago about creating a windows service, I developed and tested it on my local system. Now I want to install it on a remote host where it will run.

I am using the InstallUtil.exe from Microsoft.NET to install it on my machine. I wanted to ask what I need to move to the host to install it there? Do I only need the Configuration Source File, or do I need the complete `bin/` folder? Or is it something else entirely?

1 Comment
2024/10/21
12:46 UTC

1

Unusual titlebar created when intecepting WM_NCPAINT

https://preview.redd.it/ekgh7yjmr8vd1.png?width=1435&format=png&auto=webp&s=775744770fa277f46ca6fae60a62be23b5853f1e

I just return zero at the current moment, but what is this anyway? My goal is to remove the titlebar ONLY just like electronjs does it, ive already set the margins to zero and the WS styles are visible in the image.

My goal is to retain the shadow, resizability (but i could implement it myself) snapping while not having a titlebar. I would also like to keep the thin border stroke that appears on windows 11

What API calls should I make to acheive such a result?

2 Comments
2024/10/17
04:11 UTC

1

Creating an SQL based windows service.

Hi guys,

I'm a little new to creating windows services, so I'm here to ask for a little help. I want to create a service that will periodically query an SQL database and create a new table based on the results of the query. How can I go about implementing this.

P.S. Not sure if this is the right community to ask this. If anyone knows about that please lemme know

4 Comments
2024/10/07
11:34 UTC

2

Application Inside Taskbar for Win11

As title suggests i wanna inject my application's window to taskbar so it will be convenient and acts as native window.

ive already developed the application/UI now all i have to do is properly inject the window.

ive tried couple of times to attach my window to "ReBarWindow32" inside "Shell_TrayWnd" class it successfully attaches but the problem is its all blurred. ive tried disabling transparency, changing the theme, changing Z-axis of layers but still its all blurred behind acrylic style.

the same method worked perfectly with win10 but this time win11 is seems different

6 Comments
2024/10/05
11:29 UTC

2

Get Device Name from Device Context Handle

I'm doing some work with MS Detours and one of the things I'm detouring is the Windows API GetDeviceCaps function which receives a handle to a device context as its first parameter. What I'm trying to figure out is how to get the name of the device that this device context handle represents. Basically I need to do the reverse of what the CreateDC function does, which takes a device name (amongst other things) and returns the device context handle. Anyone know if that's possible?

0 Comments
2024/10/04
06:15 UTC

3

Has COM become slower in Windows 10?

Good day.

Long story short, found that my C#/C++/VBA application become significantly slower after migrating from Windows 7 to Windows 10. After some investigation I've found that COM works slower in Windows 10.

My test suite now is 2 VirtualBox machines with same parameters, first has Windows 7 installed, second has Windows 10 installed. I have C# application, which connects 2 COM servers. InProcess and LocalServer and calls really simple method, literally no logic, just getting scalar value.

Win7 MTA

Win10 MTA

But if I change Application to STA picture is sligthly different:

Win7 STA

Win10 STA

Now Inprocess COM is even faster on Windows 10 than in Windows 7. I assume trouble is in cross-boundaries marshalling. Somehow it's slower in Windows 10. But I cannot understand why it's so and what can I do about it.

Has someone similar issues? What can be done here? Or maybe at least someone knows how can I debug COM/DCOM/RPC method calls. Some verbose logging could help in this case.

Thank you everyone,

4 Comments
2024/10/03
17:00 UTC

1

Can't Submit Apps for 24H2 in Partner Center

It's dissapointing that, yet again, Partner Center is rejecting submissions for apps that are targetting 24H2 (10.0.26100.0).

How can this same problem plague Partner Center every time there's a new SDK version.

0 Comments
2024/10/02
07:13 UTC

1

I need help, i dont understand whats dcom but it has been crashing

https://preview.redd.it/n9dbxd8b0dqd1.png?width=757&format=png&auto=webp&s=d7ea40b99a450fa9b328c958371478abbd8f73b2

this is what it says

It was like this for couple hours about six, was i hacked or my pc just tapped out cuz its running a game 24/7 for 3 days now??

0 Comments
2024/09/22
13:06 UTC

1

Help with an NSISS app compile

Hi There,

I need some guidance on compiling a program NSISS script.

See my company uses a program called PSPP for data analysis which from what I gather is built in NSISS. Here is the website.

https://www.gnu.org/software/pspp/get.html

I’m trying to remove a message box and recompile the script in NSISS. However I keep getting errors when compiling. (Maybe I need an older version, some separate libraries. I’m not quite sure?)

One of the first things I did was reach out to the developers of this program for help. They said none of them use Windows and therefore can’t help me (which I find crazy because they release windows builds regularly)

The message box is question is located in the git rep which needs to be cloned first to see: https://savannah.gnu.org/git/?group=pspp

Location pspp/windows/pspp.nsi

line 358 - 360

Error in question MessageBox MB_OKCANCEL "This windoze installer is work in progress. It is known to have deficiencies and is recommended for testing and evaluation purposes only." IDOK continue Abort ; Allow the use to decide not to continue continue

Thoughts?

4 Comments
2024/09/18
04:50 UTC

6

Driver submission systematically rejected by Microsoft Approval at shipping label step.

Maybe someone from Microsoft here can help, this is an issue we've been having for over a year, we have an open ticket, and we've been ghosted by Microsoft dev support (again).

We're trying to submit a driver but it is systematically rejected by Microsoft Approval at shipping label step. We follow the same steps as our previous driver submissions.

The reason for rejection is "it is self-attested, and it is not Co-Dev/SSRK, and it doesn't have a proper business justification". We used our SSL certificate configured in the system to sign the driver. We provided all the requested business justification. All previous steps were successful.

We need this driver to support USB connection to devices with our software.

Any advice welcome!

1 Comment
2024/09/11
23:18 UTC

1

How does Windows Dictation tool is works on any input field, content editable div?

I'm trying to understand how does windows dictation tool inserts and edits text everywhere seamlessly?

Refer to the video
Refer to the video. You will notice that
It is seamlessly able to insert text in a content editable div.
It is able to modify the text as well. Notice the three dots that are coming.
It is able to change the text to the complete output once I click that window i.e 3 dots disappears.

https://youtu.be/gGFv9eKaBqc

What kind of APIs do I need to use to achieve this functionality? Any input on it.

Is this level of functionality achievable by Electron as well?

0 Comments
2024/09/06
18:05 UTC

1

Reading sensor events through windows service?

Any idea how I can do the above? I've tried implementing Sensors API and winRT, but both don't work, the service just fails outright.

I just really need to read sensor values/events, and at least read sensor values without making another external app if possible.

0 Comments
2024/09/05
10:47 UTC

Back To Top