2,493 questions with Windows API - Win32 tags

Sort by: Updated
0 answers

Obtaining current linked lane count for USB 3.2 Gen 2x2(20Gb/s) device using Windows APIs

How can I obtain the current linked lane count for a USB 3.2 Gen 2x2 device using Windows APIs? I have successfully obtained USB 3.2 Gen 2(10Gb/s) current linked one lane information using IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 from…

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,493 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,570 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
44 questions
asked 2024-07-03T00:38:09.04+00:00
MD 0 Reputation points
edited the question 2024-07-03T01:11:31+00:00
MD 0 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,493 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,992 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,493 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,608 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 One of the answers was accepted by the question author.

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,493 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,757 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,264 questions
asked 2024-07-01T22:19:00.44+00:00
Terry Foster 20 Reputation points
accepted 2024-07-02T11:58:20.24+00:00
Terry Foster 20 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,705 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,493 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,564 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,608 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,992 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,493 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,493 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,608 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,992 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,493 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,608 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,493 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,329 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,493 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,608 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,992 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,493 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,608 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,493 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,564 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,493 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,493 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,493 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
2 answers One of the answers was accepted by the question author.

Cannot receive WM_POWERBROADCAST message on Win10 2004

I write an application with C++, , I regist the system message notification already.when it runs on win10 1809, it can receive WM_POWERBROADCAST message, but when it runs on Win10 2004, WM_POWERBROADCAST message cannot received, I am really…

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,493 questions
asked 2020-07-16T10:07:29.177+00:00
Ningnan NN1 Feng 21 Reputation points
edited a comment 2024-06-24T10:01:47.73+00:00
Trong Nguyen Van 0 Reputation points
1 answer One of the answers was accepted by the question author.

Taskbar (Shell_TrayWnd) Transparency like in TranslucentTB using Win32 API

I'm trying to implement transparency for the taskbar (Shell_TrayWnd) in Windows, similar to the functionality that TranslucentTB has. However, in my implementation, the problem is that elements such as the Start button, search box, and attached programs…

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,992 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,493 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,564 questions
asked 2024-06-20T07:11:29.3033333+00:00
Jacob Mordon 40 Reputation points
accepted 2024-06-24T07:06:58.9533333+00:00
Jacob Mordon 40 Reputation points
0 answers

How to specify maxLength on the text size while getting the text from text box supporting ValuePattern?

I'm using the IUIAutomation textRange GetText method if my text box supports the text pattern. There, I can specify the maxLength as given here:…

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,493 questions
asked 2024-06-22T09:20:21.86+00:00
Ashwin Mittal 5 Reputation points
commented 2024-06-24T05:46:29.43+00:00
Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
1 answer

cfapi: How to hydrate placeholder file partially

Hi, We have a requirement to partially hydrate a placeholder file based on application read request and do not want hydration of rest of the file to continue in the background. Going by the documentation on the hydration policy…

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,493 questions
asked 2023-05-16T13:17:26.65+00:00
71861387 5 Reputation points
commented 2024-06-20T17:17:54.0166667+00:00
Sharadh Rajaraman 0 Reputation points
1 answer

Veracode error with SetWindowsHookEx win API call

I am getting an Embedded Malicious Code (CWE ID 506) error while using the SetWindowsHookEx win API call and running a Veracode security scan. The error message states that this technique is typically used by rootkits or other malicious code. Can anyone…

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,493 questions
asked 2024-06-10T06:50:57.29+00:00
Aswin mc 0 Reputation points
commented 2024-06-20T09:21:11.8666667+00:00
RLWA32 42,366 Reputation points