2,728 questions with Windows API - Win32 tags

Sort by: Updated
1 answer

C++ animate anything correctly

I want to understand how to correctly display something in win32. For example, how to make a square that will move with sin() up and down, so that it is correct and not as I did it through CreateCompatibleDC and create a Bitmap and then move all of it…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,847 questions
asked 2024-12-27T21:21:56.48+00:00
someone 20 Reputation points
commented 2025-01-06T07:45:01.5066667+00:00
Roy Li - MSFT 33,851 Reputation points Microsoft Vendor
1 answer

Issue while Writing\Updating .ini files using RegSetValueEx\WritePrivateProfileString

I’m encountering an issue while updating an INI file. Initially, I attempted to write the value to the registry and then update the INI file using the RegSetValueEx() WinAPI. Although the function executes without returning any errors, the value is not…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,847 questions
asked 2024-12-17T05:51:39.31+00:00
Sreekanth N Kartha 20 Reputation points
commented 2025-01-06T07:43:58.48+00:00
Roy Li - MSFT 33,851 Reputation points Microsoft Vendor
2 answers

why use SetupDiGetDeviceRegistryProperty get SPDRP_CLASSGUID always return the same id

I use the following demo to simultaneously obtain the instanceId and guid of the device, but on my computer, all devices obtain the same SPDRP_CLASSGUID value. Why is this? int main() { HDEVINFO hDeviceInfoSet =…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-04T11:56:10.7966667+00:00
哲敏 陈 86 Reputation points
commented 2025-01-06T07:38:12.2966667+00:00
Roy Li - MSFT 33,851 Reputation points Microsoft Vendor
0 answers

Windows Function to get network related details.

Hello Folks, I am looking forward to implement Windows Functions to print the following windows server's network related details. all network interface name, type, ip dhcp, mtu, ip address, ip cidr, default gateway address and matrix, hardware address…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-27T17:56:10.8533333+00:00
Prem Jha 95 Reputation points
commented 2025-01-06T05:16:20.7466667+00:00
Prem Jha 95 Reputation points
0 answers

Choosing Between GetAddrinfoEx and DNSQueryEx for Efficiently Resolving Multiple IP Addresses from Hostnames

Hi everyone, I’m working on a project where I need to resolve hostnames or Fully Qualified Domain Names (FQDNs) to a list of IP addresses. The use case involves resolving a hostname to about a dozen or two IP addresses, and I’m evaluating which function…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2025-01-02T06:30:35.6866667+00:00
Harshal Goyal 20 Reputation points
commented 2025-01-03T07:55:18.2433333+00:00
Jeanine Zhang-MSFT 10,526 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Question about Using SetFileCompletionNotificationModes with IOCP in Non-blocking Winsock Operations

Hello everyone, I'm currently working on a project where I am using WinSock to create both UDP and TCP sockets. The sockets are set in non-blocking mode using ioctl, and I am using overlapped operations with an I/O Completion Port (IOCP) to handle…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-16T10:09:09.4833333+00:00
Harshal Goyal 20 Reputation points
edited a comment 2025-01-02T06:05:27.3833333+00:00
Harshal Goyal 20 Reputation points
1 answer

VS2022 Resource Editor Problems

I've been following through the Microsoft Learn documentation for Getting Started with Win32 and C++ but I've run into a lot of problems with the resource editor in Visual Studio 2022. (…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-29T15:43:34.2766667+00:00
Nikolas Fraser 60 Reputation points
edited a comment 2025-01-02T01:20:53.28+00:00
Darran Rowe 1,426 Reputation points
1 answer One of the answers was accepted by the question author.

How should we manage the Memory of the parameters passed by OS in WindowProc

Hi, Im working in Win32 desktop application in cpp. When a Window Proc is triggered with some WM_* msg, We may receive some LPARAM and WPARAM data. These parameters are different concerning the MSG passed. This can hold variable-length data like pointers…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-30T10:51:11.39+00:00
Harshithraj1871 1,581 Reputation points
accepted 2024-12-31T04:51:52.9566667+00:00
Harshithraj1871 1,581 Reputation points
0 answers

How can I create a Gaussian blur with a printer render target using Direct2D?

I am using Direct2D to generate diagrams. I want to create a glow-effect around diagram boxes, using Gaussian blur. In order to do this, I paint a rectangle to an off-screen render target, blur it, and then get the off-screen render target's bitmap and…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,847 questions
asked 2024-12-16T17:04:06.37+00:00
simonx 126 Reputation points
edited a comment 2024-12-30T00:44:47.7933333+00:00
Castorix31 86,881 Reputation points
2 answers One of the answers was accepted by the question author.

How to create a shell extension using IExplorerCommand for Windows 11, 10, 8, and 7?

After reading Microsoft's documentation, Raymond Chen's blog, NanaZip implementation, and TortoiseSVN/TortoiseGit implementations, I created a "modern" shell extension implementing IClassFactory, IExplorerCommand, and IObjectWithSelection. …

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,772 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,662 questions
asked 2022-12-07T19:28:01.97+00:00
David Izada Rodriguez 46 Reputation points
commented 2024-12-29T19:44:07.62+00:00
Myles Jeffery 0 Reputation points
2 answers One of the answers was accepted by the question author.

How to find the Boot Volume GUID using Windows APIs?

I am quite new to Win32 programming. Pardon me for any mistakes in the question. I am trying to get the GUID of the Boot Volume of the system of which I have device path which I found by querying the BCD device path through registry function. I tried to…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-19T10:35:33.3266667+00:00
Prem Jha 95 Reputation points
commented 2024-12-27T16:57:11.7666667+00:00
Prem Jha 95 Reputation points
0 answers

Windows 10 - What do the individual parts of the game controller calibration values in the registry represent?

Greetings! I am running Win-10 pro. I have a Saitek X52 joystick game controller that has a problem with the "twist" (rudder) axis where it doesn't show the full range of values, and the "center" is offset to the left of center. (I…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-22T21:56:47.6833333+00:00
Jim Harris 0 Reputation points
commented 2024-12-25T02:15:08.8733333+00:00
Jim Harris 0 Reputation points
2 answers

How do I filter GPUs by type in DXGI (integrated vs dedicated device)?

Hello! I have written an extension for the Elgato Stream Deck using C++ and Microsoft DXGI (available here) that queries the utilization of the user's GPU and displays it on the Stream Deck. I need to be able to filter out integrated GPUs and only…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,847 questions
asked 2024-12-21T04:19:39.06+00:00
Noah Thompson 5 Reputation points
commented 2024-12-24T06:47:35.2166667+00:00
Castorix31 86,881 Reputation points
1 answer

where can I find Cardmod.h (part of CPDK)

When reading the Windows Smart Card Minidriver Specification, I have found multiple reference to the header files from Cryptographic Provider Development Kit. When looking at the code of the Estonian card minidriver,…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,664 questions
asked 2021-03-08T00:14:53.89+00:00
pawel jasinski 6 Reputation points
edited an answer 2024-12-24T04:04:32.5966667+00:00
Christopher Warrington 0 Reputation points
4 answers

WSUSSCN2.cab file for Windows 11

I have been using a the wsusscn2.cab file and WUA in a script for years to determine the latest non-superseded applicable UpdatesIDs so that I can download them and bring them to my offline networks. Now that we are moving to Windows 11 it seems to me…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
3,000 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,662 questions
asked 2024-06-13T15:51:07.07+00:00
ArmoredEmu01 5 Reputation points
commented 2024-12-23T20:10:06.22+00:00
Simon Fonteneau 45 Reputation points
0 answers

Issues with Custom Page Size on OKI MICROLINE 8480FB Using Windows API and C++

I'm working with the Windows API in C++ to set a custom page size for a dot-matrix printer (OKI MICROLINE 8480FB). I successfully configured the page size to 16 inches in width and 21 inches in height. Using this setup, I can print content at the…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-17T19:48:39.6366667+00:00
Son Tran 0 Reputation points
edited a comment 2024-12-19T03:55:54.4766667+00:00
Son Tran 0 Reputation points
1 answer

Changes to SEH on Windows 11 24H2 causing problems

Our Fortran Win32 system has been around a long time. One thing it does is when a calculation underflows it can truncate to zero immediately. The advantage is that the value doesn't continue to lose precision which is important for some calculation. To…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,662 questions
asked 2024-12-07T18:05:09.1866667+00:00
Robert Chafer 1 Reputation point
commented 2024-12-18T23:10:30.8633333+00:00
Robert Chafer 1 Reputation point
1 answer

About DhcpGetClientInfoV6 function in dhcpsapi.h

When I used the DhcpGetClientInfoV6 function in dhcpsapi.h, it returned code 2. After searching, I found the content, but I couldn't understand it. $ .\Err_6.4.5.exe 2 # for hex 0x2 / decimal 2 BTH_ERROR_NO_CONNECTION …

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,659 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,044 questions
asked 2024-12-09T08:15:46.13+00:00
陶海洋 0 Reputation points
answered 2024-12-18T02:22:48.19+00:00
陶海洋 0 Reputation points
1 answer

NetWkstaUserEnum is bugged, it is impossible to use resumeHandle

Referring documentation: https://learn.microsoft.com/en-us/windows/win32/api/lmwksta/nf-lmwksta-netwkstauserenum Steps to reproduce the bug: you need a server with many simultaneously concurrent logged users call NetWkstaUserEnum, with prefmaxlen…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-12-13T19:57:09.1533333+00:00
Stefano Balzarotti 0 Reputation points
commented 2024-12-16T01:30:07.28+00:00
Jeanine Zhang-MSFT 10,526 Reputation points Microsoft Vendor
0 answers

How do I reduce the initial distance threshold for Interaction Context manipulations?

In the application I am developing, the interaction context callback that I have registered is not being called until the finger that already has contact has moved too many pixels. Basically, this causes a big jump. I'm not sure how to reduce this, or if…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
asked 2024-11-22T06:10:17.85+00:00
Jim Bean 0 Reputation points
commented 2024-12-14T23:08:50.3566667+00:00
Jim Bean 0 Reputation points