2,497 questions with Windows API - Win32 tags

Sort by: Updated
0 answers

How to record the mouse drag event and simulate it ?

I'm a newbie of Rust, and try to write a windows desktop app. I read the documents then I found SetWindowsHookExA(WH_MOUSE_LL,...) can record the mouse event, but I only record the mouse down, move and up. no drag event produced. I try to simulate them…

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,497 questions
asked 2024-07-04T15:41:08.25+00:00
泽东 钱 0 Reputation points
edited the question 2024-07-04T15:48:02.6866667+00:00
泽东 钱 0 Reputation points
2 answers

How can I know if started by WER, the OS is running in a GUI environment?

Hi, I am building a Win32 application using WinUI2 as GUI. Before displaying a window to the user, we are checking our Desktop capabilities from the Operating System has shown below. bool CheckDesktop () noexcept { HDESK thread_desktop; …

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,497 questions
asked 2024-07-04T07:48:35.1333333+00:00
Rohan Pande 375 Reputation points
commented 2024-07-04T14:51:16.2233333+00:00
RLWA32 42,366 Reputation points
2 answers One of the answers was accepted by the question author.

Launching Windows Applications using Voice Assistants

Is there an alternative to Cortana on Windows that I can use to launch my applications using a voice command like "Open Abc App"? I have come across an application named "Voice Access," but I can't find any documentation on how to use…

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
745 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,497 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,610 questions
asked 2024-04-24T06:38:51.75+00:00
Rohan Pande 375 Reputation points
edited an answer 2024-07-04T14:43:43.1966667+00:00
Caozhi Li 0 Reputation points Student Ambassador
0 answers

CreateFile() takes a long time (~5 seconds) to fail on COM ports already exclusively locked/opened by another program

Good day, I'm writing a program ( well, have written, and it's working fine ), and part of the startup is to scan the available COM ports to see which one our device is connected to. It all works fine except that on some devices there can be a…

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,497 questions
asked 2024-07-03T13:10:07.55+00:00
Paul Daniels 0 Reputation points
commented 2024-07-04T11:07:12.0233333+00:00
Paul Daniels 0 Reputation points
0 answers

Does URLDownloadToFile still work on a Windows 11 computer without Internet Explorer on it?

I have written a windows console program that uses the win32 URLDownloadToFile function. This then ran for a long time without any problems on a windows 11 machine. However, 2 months ago this PC was reinstalled and since then the program no longer works…

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,497 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,610 questions
asked 2024-07-04T07:03:02.5766667+00:00
valentin anderegg 0 Reputation points
commented 2024-07-04T11:06:27.4566667+00:00
valentin anderegg 0 Reputation points
4 answers

How to change drive letters (was: Can I use Visual C to program system tools)

I need to be able to write a tool that can change the drive letter in my application. When I insert a usb hard drive the program recognises the volume it should be with the drive letter in [] brackets in the label. When I insert the usb drive sometimes…

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,497 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,779 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-07-01T22:19:00.44+00:00
Terry Foster 0 Reputation points
commented 2024-07-04T07:09:28.9433333+00:00
Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
1 answer

SetNamedSecurityInfo() returns : Error: (1307)

Hi, I'm curently trying to buid a chown.exe using Win32API SetNamedSecurityInfo() to change file ownership. When running this .exe in elevated mode or if the new owner is the same as the current owner, it works file. But when targetting an other user as…

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,497 questions
asked 2024-07-03T08:25:49.16+00:00
Jean-Pierre Ribeauville 20 Reputation points
commented 2024-07-03T12:44:05.2266667+00:00
RLWA32 42,366 Reputation points
1 answer

Why max_align_t not defined in stddef.h in Windows SDK 10.0.20348.0 C17 (/std:c17)

#include <stdio.h> #include <stddef.h> int main(void) { printf("%d\n", _Alignof(max_align_t)); ```} This C code, Error: E0020, C2061, in Visual Studio Community 2019 16.11.17, Windows SDK 10.0.20348.0, C17 or C11 The same error…

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,497 questions
asked 2024-06-24T13:33:18.9533333+00:00
zhimin yuan 0 Reputation points
commented 2024-07-03T00:50:14.99+00:00
zhimin yuan 0 Reputation points
1 answer One of the answers was accepted by the question author.

C++ Win32 fullscreen windows cause the taskbar, which is set to auto-hide, to not rise properly.

When a window is displayed full screen (or takes up the whole screen), the taskbar can't be raised (the user has set the auto-hide taskbar option), I don't want this window to cause this problem, is it possible to set up this window in C++ so that the…

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.
4,997 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,497 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,610 questions
asked 2024-06-28T03:28:50.63+00:00
RL Chen 230 Reputation points
accepted 2024-07-02T14:23:24.7766667+00:00
RL Chen 230 Reputation points
2 answers

How Can I track the Last DPI which is sent by WM_DPICHANGED in WPF?

I want to scale my WPF application according to available screen DPI. I know there Per Monitor DPI aware available but that are completely different what I want to achieve. I want to disable scaling for my WPF application even if windows has some scale…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 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,497 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,569 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,610 questions
asked 2024-06-23T21:10:17.6933333+00:00
MERUN KUMAR MAITY 531 Reputation points
commented 2024-07-02T08:58:37.5966667+00:00
Hongrui Yu-MSFT 780 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

AdjustTokenPrivileges Error if not Administrator

Hi, I'm currently trying to make a mimic of chown by building a chown.exe using C language. When running my app from command prompt as Administrator , it runs fine. But when running it from "normal command prompt , it fails with…

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.
4,997 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,497 questions
asked 2024-06-29T09:49:23.5966667+00:00
Jean-Pierre Ribeauville 20 Reputation points
commented 2024-07-01T11:02:06.3433333+00:00
Jean-Pierre Ribeauville 20 Reputation points
1 answer One of the answers was accepted by the question author.

CryptAcquireCertificatePrivateKey fails to retrieve the private key for certificate listed under CERT_SYSTEM_STORE_LOCAL_MACHINE

I used Below program to retrieve the private key of "1-ksp-digitalid-MSKSP 27th June" certificate stored under LOCAL_MACHINE. It gives me error   0x80090016 i.e. Keyset does not exist error. On Properties you can see dialog saying that…

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,497 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,610 questions
asked 2024-06-27T12:55:24.3833333+00:00
Prafulla Shirke 20 Reputation points
accepted 2024-07-01T06:56:07.83+00:00
Prafulla Shirke 20 Reputation points
2 answers

Why does my transparent-background window turn into black screen after window ghosting?

I have a pop-up window that acts as a watermark on my application over a parent window. It has a transparent background (WS_EX_TRANSPARENT), but when the application becomes non-responsive, Windows adds a ghost window with a black background. I tried…

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.
4,997 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,497 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,610 questions
asked 2024-05-10T14:33:43.0133333+00:00
Aditya Pingle 0 Reputation points
commented 2024-06-28T18:16:02.87+00:00
RLWA32 42,366 Reputation points
4 answers One of the answers was accepted by the question author.

How can I launch my application automatically on system reboot?

Is there an API or method that I can use to make sure my application launches automatically when the system restarts? I would appreciate any help or guidance on this matter.

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,497 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,351 questions
asked 2024-05-02T13:09:11.53+00:00
Rohan Pande 375 Reputation points
commented 2024-06-28T09:54:36.1+00:00
RLWA32 42,366 Reputation points
1 answer One of the answers was accepted by the question author.

Need to get real OS Version

Hi need to get the real OS Version of the current machine in C++. Essentially I need something similar to "GetVersionExW", but a version of it that: Is not deprecated Does not require the application to be explicitly manifested…

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,497 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,610 questions
asked 2021-10-19T07:34:36.423+00:00
t miguel 21 Reputation points
commented 2024-06-26T17:15:09.58+00:00
RLWA32 42,366 Reputation points
1 answer

Where to find correct version information using in C on Windows

I'm looking to programmatically find the correct version information for Windows using the "C" programming language. I've searched online with no luck. Does anyone know where I can find resources to help me achieve this goal?

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.
4,997 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,497 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,610 questions
asked 2024-06-22T22:13:39.2533333+00:00
Thad T 26 Reputation points
commented 2024-06-26T06:24:45.29+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer

How to read and output the NPU utilization

Hi All How to use the following MS learning to read and output the NPU utilization. Thank you. https://learn.microsoft.com/en-us/windows/win32/api/activitycoordinatortypes/ne-activitycoordinatortypes-activity_coordinator_resource

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,497 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,569 questions
asked 2024-06-18T05:32:45.61+00:00
John Huang 0 Reputation points
commented 2024-06-26T05:56:48.38+00:00
Tong Xu - MSFT 2,116 Reputation points Microsoft Vendor
1 answer

How to obtain API keys in OneDrive

We are planning to integrate TANDA to our OneDrive so that the Qualification Documents in TANDA will be automatically synced in our OneDrive folder. This is to avoid unnecessary manual saving of files and to ensure that the file that we have is always…

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,497 questions
asked 2024-06-20T03:18:01.6733333+00:00
Gail Maurice Santos 0 Reputation points
answered 2024-06-25T09:58:31.5766667+00:00
Claudia Dos Santos Haz (CONCENTRIX CORPORATION) 930 Reputation points Microsoft Vendor
8 answers One of the answers was accepted by the question author.

How do I find out a public IP address on the Internet using the Win32 API?

How do I find out a public IP address on the Internet using the Win32 API? I am interested in the public ip address, not the IP address of the local network. Interested in IPv4 and IPv6. Now I find out my ip address like this: I go to some site that…

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,497 questions
asked 2024-06-24T07:02:48.6033333+00:00
Participant 41 Reputation points
commented 2024-06-24T19:16:45.6466667+00:00
David Lowndes 2,470 Reputation points MVP
1 answer One of the answers was accepted by the question author.

How to use BCryptDeriveKeyCapi with RC4 to replace CryptoAPI code

I have some old code that uses CryptoAPI to encrypt data with RC4. The legacy process is (in summary): CryptAcquireContext() CryptCreateHash("MD5") CryptHashData (password, length) CryptDeriveKey ("RC4", ) CryptEncrypt () The new…

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,497 questions
asked 2024-06-18T12:50:27.4233333+00:00
David Robinson 20 Reputation points
commented 2024-06-24T11:20:56.7566667+00:00
David Robinson 20 Reputation points