2,427 questions with Windows API - Win32 tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

Bluetooth LE - Programmatically determine if a peripheral has lost its side of the bond keys

A common scenario in Bluetooth LE is for one side of a bonded pair of devices to lose their side of previously exchanged bond keys. The Bluetooth LE spec states that the peripheral shall send a LL_REJECT_EXT_IND with error code 6, "PIN or Key…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,668 questions
Universal Windows Platform (UWP)
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,427 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,236 questions
asked 2024-03-06T21:13:47.2233333+00:00
EricP-8687 60 Reputation points
edited a comment 2024-03-11T22:06:41.6566667+00:00
EricP-8687 60 Reputation points
2 answers One of the answers was accepted by the question author.

RichEdit's text not visible when window first pops up.

#include <Windows.h> #include <Richedit.h> HWND hwnd; HWND hwnd_richedit_panel; HWND richEdit; WNDPROC oldStaticProc; HWND hwnd_green_panel; WNDPROC oldGreenProc; int WINAPI WinMain(HINSTANCE, HINSTANCE, PSTR, int); LRESULT CALLBACK…

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,427 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,539 questions
asked 2024-03-11T04:37:56.38+00:00
Francesco Amatto 45 Reputation points
accepted 2024-03-11T17:46:06.32+00:00
Francesco Amatto 45 Reputation points
1 answer One of the answers was accepted by the question author.

How to draw a border and background color to the limits of a window?

#include <Windows.h> #include <Richedit.h> HWND hwnd; HWND panel; HWND richEdit; WNDPROC oldStaticProc; int WINAPI WinMain(HINSTANCE, HINSTANCE, PSTR, int); LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT msg, WPARAM wParam, LPARAM…

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,427 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,539 questions
asked 2024-03-11T00:17:38.78+00:00
Francesco Amatto 45 Reputation points
commented 2024-03-11T17:45:19.8866667+00:00
Francesco Amatto 45 Reputation points
1 answer One of the answers was accepted by the question author.

Clarification on the nFlags Parameter Default Value for PrintWindow Function

Hello Community, I am currently working with the PrintWindow function for a Windows desktop application test and I came across a question regarding the nFlags parameter. I understand that this parameter can be used with the PW_CLIENTONLY flag to capture…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,668 questions
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,771 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,427 questions
asked 2024-03-08T13:39:02.4733333+00:00
Yucheng Song 41 Reputation points
commented 2024-03-11T15:17:07.64+00:00
Yucheng Song 41 Reputation points
1 answer One of the answers was accepted by the question author.

Would a one-shot timer cause a memory leak?

I created a timer queue, then created some one-shot timer using the below code: CreateTimerQueueTimer( &mut handle, self.timer_queue, Some(timer_runner), Some(ptr as _), duration.as_millis() as u32, 0, WT_EXECUTEONLYONCE, ) I have searched…

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,427 questions
asked 2024-03-08T16:10:35.4766667+00:00
峻魁 张 20 Reputation points
accepted 2024-03-11T08:05:41.84+00:00
峻魁 张 20 Reputation points
0 answers

`FormatMessage()` fails with specific system locales

On systems where the regional and language settings are derived from a common base language, e.g. English (Australia) from English (United Kingdom) or English (United States), the following call to the Windows API FormatMessageW() or FormatMessageA() 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,427 questions
asked 2024-03-07T18:41:32.6333333+00:00
Klaus Triendl 0 Reputation points
commented 2024-03-11T06:08:18.56+00:00
Tong Xu - MSFT 1,361 Reputation points Microsoft Vendor
1 answer

Is there a way to put HTML files on the screen without building them in WinUI3?

Hello, In the winUI3 project, The code I posted below is currently my project code. As you can see from the code I wrote, I tried to create an html inside the project and use webView 2 to organize the screen with the local path of the project. …

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,427 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,280 questions
asked 2024-03-07T02:09:11.04+00:00
차준혁 40 Reputation points
commented 2024-03-08T06:26:08.5433333+00:00
차준혁 40 Reputation points
1 answer One of the answers was accepted by the question author.

Does the `PrintWindow` function's behavior depend on the calling process's DPI awareness?

Hello, everyone! I am a student learning Windows programming using Python and the ctypes library. I have a question regarding the behavior of the PrintWindow function in relation to DPI awareness. I am currently working on a project that involves…

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,427 questions
asked 2024-03-06T17:03:45.01+00:00
Yucheng Song 41 Reputation points
accepted 2024-03-08T05:51:17.6566667+00:00
Yucheng Song 41 Reputation points
0 answers

compositor clock api question

Waiting on the compositor clock is done by a call to DCompositionWaitForCompositorClock(), which looks like it is probably a wrapper around something like WaitForMultipleObjects() and some compositor event object(s). Wouldn't it have been better 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,427 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,539 questions
asked 2024-02-21T00:46:30.2833333+00:00
Geoff Hale 0 Reputation points
commented 2024-03-07T19:46:09.1833333+00:00
Geoff Hale 0 Reputation points
1 answer

How can the loading speed of WebView2 be increased?

In the official WebView2 example, WebView2APISample, added code to debug output the time interval from the beginning of page loading to the completion of loading. Loading the following two websites takes more than 10 seconds each, and the debug output…

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,427 questions
asked 2024-03-04T09:03:14.9366667+00:00
si zuo 20 Reputation points
commented 2024-03-07T02:21:18.05+00:00
Xiaopo Yang - MSFT 11,496 Reputation points Microsoft Vendor
1 answer

Stuck in Windows 10 Kiosk Mode - No way to switch users

Hi, I was trying kiosk mode and unfortunately did not disable "Use my sign-in info to automatically finish setting up my device after an update or restart". Now the login screen never shows other users. So I have not found a way yet to get…

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,427 questions
asked 2021-06-17T22:58:29.43+00:00
Jawahar S 1 Reputation point
answered 2024-03-05T13:24:57.65+00:00
Markzoll Natascha 0 Reputation points
1 answer

Event ID: 4625 Thrown while using IADs::Get() method

I am using IADS::Get() method to retrieve "ntSecurityDescriptor" from IADS interface. Code Snippet: HRESULT hr = S_OK; IADs* pADs = NULL; BSTR attrName = SysAllocString(L"ntSecurityDescriptor"); VARIANT…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,176 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,427 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,904 questions
asked 2024-03-04T16:10:39.34+00:00
Selva Kumaresan 0 Reputation points
answered 2024-03-05T06:54:40.6233333+00:00
Selva Kumaresan 0 Reputation points
1 answer One of the answers was accepted by the question author.

Why does get_CurrentNativeWindowHandle return 0 in some cases?

I am using a focus change handler to track change of focus across all applications on Windows. When I focus into the following textbox in Chrome on an empty HTML page: <textarea></textarea> The value of window handle I obtain is 0. I am…

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,427 questions
asked 2024-03-01T08:47:24.7066667+00:00
Gaurang Tandon 20 Reputation points
commented 2024-03-01T13:34:40.7666667+00:00
RLWA32 40,656 Reputation points
1 answer One of the answers was accepted by the question author.

I can't connect to a Bluetooth LE Device using c++ Win32 API

I can't connect to a Bluetooth LE Device using c++ Win32 API - Visual Studio 2019 (v142). A few years ago there was a working Example at MSDN, but today the code doesn't work anymore. https://gist.github.com/programmarchy/c9d02e22d58bfab3f8bb seems to be…

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,427 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,539 questions
asked 2024-02-27T11:28:17.07+00:00
nzr 20 Reputation points
accepted 2024-03-01T13:33:32.8866667+00:00
nzr 20 Reputation points
1 answer

WebauthN c++ Native Windows API in credential provider

Hi team, I've made a simple console application that calls Windows WebAuthn API's WebAuthNAuthenticatorGetAssertion() which will display CredentialUIBroker.exe to authenticate with an external FIDO2 security key and platform Windows authenticator…

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,427 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,539 questions
asked 2024-02-19T11:39:47.02+00:00
VIGNESH M 0 Reputation points
commented 2024-03-01T07:55:48.5566667+00:00
Jeanine Zhang-MSFT 9,181 Reputation points Microsoft Vendor
0 answers

Compiled app doesn't work when opened with Visual Studio, but does with Windows Explorer

Hello, I'm building a C .exe that I somehow can't launch correctly anymore through Visual studio green arrow button (and CTRL+F5), but I'm able to launch it successfully from windows explorer. When launched from Visual Studio 2022, the Icon and the name…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,626 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,427 questions
asked 2024-02-18T22:52:46.9133333+00:00
Pierro 0 Reputation points
commented 2024-03-01T07:54:03.1+00:00
Tong Xu - MSFT 1,361 Reputation points Microsoft Vendor
0 answers

Copying a dll fails with error 32.

Edit: all running code can be found here: https://gist.github.com/Haiderahandali/6d39a601c547115e42c973e8796ed5d7 Original question: I am trying to implement hot reloading in my 2D game engine, my engine is in main.cpp and my game is game.cpp 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,427 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,539 questions
asked 2024-02-28T09:22:24.92+00:00
Ali AL-Darraji 0 Reputation points
commented 2024-02-29T20:06:25.81+00:00
Ali AL-Darraji 0 Reputation points
7 answers

RCT implementation query

Hi, we are trying to use the RCT . Few questions related to it: the query WMI GetVirtualDiskChanges or VHD QueryChangesVirtualDisk returns access_denied error while getting the disk changes for full. Any idea on what is best to perform full backup ? …

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,427 questions
asked 2020-08-11T13:18:10.54+00:00
balu T 41 Reputation points
edited an answer 2024-02-29T17:31:15.6433333+00:00
Bruno da Silva 0 Reputation points
2 answers One of the answers was accepted by the question author.

PerformanceCounterCategory("GPU Engine") GetInstanceNames() System.InvalidOperationException: Category does not exist

codes: var category = new PerformanceCounterCategory("GPU Engine"); var counterNames = category.GetInstanceNames() Issue: calling GetInstanceNames() cause exception:System.InvalidOperationException: Category does not exist this is because 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,427 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,236 questions
asked 2024-02-18T10:23:46.12+00:00
you 20 Reputation points
commented 2024-02-29T02:17:28.48+00:00
you 20 Reputation points
0 answers

InstallELAMCertificateInfo failed with last error "The parameter is incorrect"

Hi, I have a code that installs my ELAM driver which works on server 2012, 2019, 2022. (Its also works on client machines 8.1, 10). For some reason I getting error only on server 2016 with the following message: "The parameter is…

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,427 questions
asked 2024-02-28T21:37:15.9+00:00
Jack Abulafia 0 Reputation points
commented 2024-02-29T01:54:54.9166667+00:00
Jeanine Zhang-MSFT 9,181 Reputation points Microsoft Vendor