2,942 questions with Windows development | Windows API - Win32 tags
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
^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
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
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
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
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
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
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
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
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
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
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
<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
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
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
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
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
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
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
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,…