2,942 questions with Windows development | Windows API - Win32 tags

Sort by: Updated
2 answers

Error Handling in user32.lib

CreateWindowEx is trying to call a NULL defined WndProc and silently crashes. If I register a WNDCLASS like this: WNDCLASSA wc = { .lpszClassName = "Test" }; RegisterClassA(&wc); the class is registered successfully. But if…

Windows development | Windows API - Win32
asked 2026-03-18T10:34:11.0633333+00:00
KevinL 0 Reputation points
edited a comment 2026-03-23T16:06:23.0933333+00:00
RLWA32 52,261 Reputation points
1 answer

^C sent to the stdin of a program running under a pseudo console does not generate break

I've written a program that launches a console application within a pseudoconsole. Following the documentation, I: Create two anonymous pipes. Call CreatePseudoConsole, passing in the appropriate end of each of the pipes for standard input &…

Windows development | Windows API - Win32
asked 2026-03-22T22:26:33.37+00:00
Jonathan Gilbert 0 Reputation points
commented 2026-03-23T12:09:00.0666667+00:00
Jonathan Gilbert 0 Reputation points
1 answer

how to create this 3d image using direct 3d?

I want to create this 3d image using direct3d. then I can rotate and click the sub image in it. should I : 1.create this using other 3d software and then using direct3d? 2.just create them using direct3d? but how to add the light ?

Windows development | Windows API - Win32
asked 2026-03-21T12:21:37.37+00:00
mc 6,841 Reputation points
answered 2026-03-23T07:37:40.87+00:00
Taki Ly (WICLOUD CORPORATION) 150 Reputation points Microsoft External Staff Moderator
2 answers

Supported way to detect input or hotkey when Windows session is locked (secure desktop)

Hello, We need to validate a supported architecture for implementing a user-initiated trigger on Windows. Scenario: We have a Windows application or Windows Service running on a client machine. The user session may be signed in but locked. We need to…

Windows development | Windows API - Win32
asked 2026-03-20T12:08:20.08+00:00
Jordi Parareda 0 Reputation points
answered 2026-03-23T06:35:52.4966667+00:00
Taki Ly (WICLOUD CORPORATION) 150 Reputation points Microsoft External Staff Moderator
0 answers

Dbghelp API fails to find symbol files in downstream store

Over time the local store that I used for downloaded symbol files had become quite large. I considered using the AgeStore utility to prune it but it balked because file system last access updating was disabled. So I decided to write a utility using the…

Windows development | Windows API - Win32
asked 2026-03-20T07:34:53.8733333+00:00
RLWA32 52,261 Reputation points
edited a comment 2026-03-22T11:17:51.0566667+00:00
Gary Nebbett 6,476 Reputation points
2 answers One of the answers was accepted by the question author.

Need license infomation for BITS service

Hi, Can you provide the license information to use BITS interface https://learn.microsoft.com/en-us/windows/win32/bits/bits-dot-net Thanks, Kishore

Windows development | Windows API - Win32
asked 2026-03-19T11:06:12.1833333+00:00
MUDAPAKA Kishore K 25 Reputation points
commented 2026-03-20T07:03:54.59+00:00
Taki Ly (WICLOUD CORPORATION) 150 Reputation points Microsoft External Staff Moderator
1 answer

How to avoid false positive where modem lines go High upon serial port opening using win32?

I'm using the Win32 library to interact with serial ports. Using pretty standard code, when I call createFile(), I notice that all modem lines suddenly send back a HIGH signal once the call completes. This is causing false positives in my application.…

Windows development | Windows API - Win32
asked 2026-03-12T19:47:49.0033333+00:00
sirjuicebox-9237 0 Reputation points
commented 2026-03-20T02:27:08.35+00:00
Taki Ly (WICLOUD CORPORATION) 150 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

NCryptSetProperty returns error 0x80090026 while deriving session keys using NCryptDeriveKey

I am trying to use NCryptDeriveKey to derive session encryption and authentication keys using HKDF. I can generate ephemeral key-pair NCryptCreatePersistedKey and return the key handle and public key. In another function for deriving session keys I am…

Windows development | Windows API - Win32
asked 2026-02-10T18:39:42.0166667+00:00
Sourabh 20 Reputation points
commented 2026-03-18T08:46:25.5533333+00:00
Sourabh 20 Reputation points
2 answers One of the answers was accepted by the question author.

OutputDebugStringA not working at all

Neither OutputDebugStringA nor OutputDebugStringB (ODS) are working in my environment, Windows 11, dell intel machine, Visual Studio Community 2022 64-bit. The symptom is that the call is made and returns without error, but the output does not show up…

Windows development | Windows API - Win32
asked 2026-03-14T14:00:59.79+00:00
Andrew Mercer 546 Reputation points
commented 2026-03-14T22:52:40.7333333+00:00
Andrew Mercer 546 Reputation points
2 answers

Correct usage of DisplayTask::SetSignal

I can't get Windows.Display.Devices.Core DisplayTask::SetSignal to work as documented Sample application compiles, runs and presents content to my monitor I have created a DisplayFence by opening a shared handle to a D3D11Fence and passed that in as the…

Windows development | Windows API - Win32
asked 2025-12-20T10:27:58.7433333+00:00
Peter Kinsey-James 0 Reputation points
answered 2026-03-13T11:59:30.19+00:00
Peter Kinsey-James 0 Reputation points
2 answers One of the answers was accepted by the question author.

new to microsoft learn

hello, I'm new to microsoft learn and I want to read some documentations related to OS development and windows applications development (e.g. direct2d, Win32API, universal C runtime, etc...) but I don't know the suitable "reading…

Windows development | Windows API - Win32
asked 2026-03-04T19:57:48.8366667+00:00
Mohammed Moustafa 20 Reputation points
commented 2026-03-12T07:50:33.9233333+00:00
Michael Le (WICLOUD CORPORATION) 11,085 Reputation points Microsoft External Staff Moderator
4 answers

Program is fine but using a shortcut makes it fail

I wrote an app that uses a FileSystemWatcher to react when certain files (Excel) are saved and each time that happens, the file gets copied to a separate Drive/Folder. I added some code to "flash" the App Icon after the save is complete. As…

Windows development | Windows API - Win32
asked 2026-03-03T23:54:43.5233333+00:00
Devon Nullman 60 Reputation points
answered 2026-03-11T12:40:33.94+00:00
RLWA32 52,261 Reputation points
3 answers One of the answers was accepted by the question author.

<vcversion_generated.h> referenced inside dllinit.cpp missing

Hi, When reading MFC source code, inside dllinit.cpp, #include "stdafx.h" #include <stdarg.h> #include <vcversion_generated.h> #include "sal.h" <vcversion_generated.h> seems internal to MFC, and I cannot find it…

Windows development | Windows API - Win32
asked 2026-03-03T08:24:28.53+00:00
masterjodi 80 Reputation points
accepted 2026-03-06T06:02:47.87+00:00
masterjodi 80 Reputation points
2 answers

WSAIoctl for SIO_TIMESTAMPING always returns 10045 error (with WSAGetLastError). Cannot understand why

Hello everyone! I am creating an open-source PTPv2 Project for Windows 10. I came across the SIO_TIMESTAMPING capability recently but when I try to enable it I get error 10045. Here is the code that initialized the network portion of the project. …

Windows development | Windows API - Win32
asked 2026-02-26T16:37:27.9333333+00:00
Nikos Terzis 0 Reputation points
commented 2026-03-05T10:59:24.8+00:00
Michael Le (WICLOUD CORPORATION) 11,085 Reputation points Microsoft External Staff Moderator
1 answer

WGC Capturing Exclusive Fullscreen Games/Apps

Hey, Hope whoever is reading this is doing fine and well. I was wondering whether WGC (Windows Graphics Capture) API will have the feature to record Apps or Games that are in Exclusive Fullscreen and not Borderless Fullscreen Only, As many gamers are…

Windows development | Windows API - Win32
asked 2026-02-27T19:57:53.38+00:00
Crazy Blop 0 Reputation points
commented 2026-03-05T09:55:26.9133333+00:00
Michael Le (WICLOUD CORPORATION) 11,085 Reputation points Microsoft External Staff Moderator
1 answer

MIDL Compiler generates wrong year

Using the MIDL compiler with IDL statements to generate a .TLB file, the compiler inserts a text line into the .TLB such as: Created by MIDL version 8.01.0628 at Mon Jan 18 19:14:07 2038. The year should be the year the .TLB was created (e.g., 2024), NOT…

Windows development | Windows API - Win32
asked 2024-11-11T17:47:47.58+00:00
RDan 10 Reputation points
commented 2026-03-04T20:10:54.7133333+00:00
Ray-6471 0 Reputation points
0 answers

DirectComposition HW protected swap chain: Capture APIs return black in Windows 24H2

I’m creating a DirectComposition swap chain with DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED, and the call succeeds. The protected surface displays correctly, but on Windows 24H2 the OS capture APIs (PrintScreen, Windows.Graphics.Capture, DWM capture) now return a…

Windows development | Windows API - Win32
asked 2025-09-08T19:13:32.3733333+00:00
Tolgahan 0 Reputation points
commented 2026-03-04T10:54:26.3933333+00:00
Tolgahan 0 Reputation points
1 answer One of the answers was accepted by the question author.

Windows 10 NVMe Set Feature HCTM returns ERROR_INVALID_FUNCTION

As per Microsoft documentation, the NVMe Set Feature HCTM command is supported in Windows 10, beginning with 19H1 as stated here https://learn.microsoft.com/en-us/windows/win32/fileio/working-with-nvme-devices#protocol-specific-set However, when I try…

Windows development | Windows API - Win32
asked 2026-02-27T08:48:53.7766667+00:00
Florian Leskovsek 20 Reputation points
edited a comment 2026-03-04T10:53:15.58+00:00
Florian Leskovsek 20 Reputation points
1 answer

IGraphicsCaptureItemInterop::CreateForMonitor fails on Windows 11 build 26100 update .7623 but works on .3775

I have a Win32 app using Windows.Graphics.Capture to capture both monitors and individual windows. On my dev machine (Windows 11 build 26100 update .3775) everything works fine, but on the target machine (Windows 11 build 26100 update .7623) calls to…

Windows development | Windows API - Win32
asked 2026-02-12T07:31:27.9+00:00
Cohen, Benny [BWIIL] 0 Reputation points
commented 2026-03-03T09:26:31.86+00:00
Michael Le (WICLOUD CORPORATION) 11,085 Reputation points Microsoft External Staff Moderator
2 answers

Windows 11 – Different behavior of SW_SHOWMAXIMIZED in multi-monitor MFC application

We have an MFC MDI application running in a multi-monitor setup. On Windows 10, minimizing the application and restoring it via taskbar click correctly maximizes it across all monitors. Starting with Windows 11 23H2, after minimizing the application,…

Windows development | Windows API - Win32
asked 2026-02-25T08:55:23.7466667+00:00
Siji, Merlin 0 Reputation points
commented 2026-03-03T09:05:12.45+00:00
Michael Le (WICLOUD CORPORATION) 11,085 Reputation points Microsoft External Staff Moderator