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…
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…
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…
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…
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…
`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…
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. …
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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 ? …
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…
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…