Exception Handling in Windows
Windows provides the following exception handling frameworks: Structured Exception Handling (SEH) Vectored Exception Handling (VEH) SEH is just the Windows's version of the C++ try-catch, and documentation suggests using the C++ try-catch blocks. I…
The behavior of the SetWindowDisplayAffinity API differs depending on the Windows 10 build version.
The behavior of the SetWindowDisplayAffinity API differs depending on the Windows 10 build version. API: SetWindowDisplayAffinity(hwnd, WDA_MONITOR); Windows 10 1909 (18363.418): Works correctly; when my dialog is captured, it turns black. Windows 10…
Is user32.dll has any dependency?
I want to use HDC to draw text in android. So can I copy user32.dll to android and then use HDC ? to get bitmap with some text? I will specify font and font-size
Win32 HDC issue
I have a problem with drawing HDC outside WM_PAINT message, I draw in function with while(true) loop void quadcycle() { while(true) { hdc = GetDC(hwnd); RECT rc = {50,50,150,150}; FillRect(hdc, &rc,…
DXGI_ERROR_ACCESS_DENIED when trying to draw a triangle with DirectX 12
So, I'm currently working on drawing a triangle with DirectX 12 and making some helper functions for myself, but CreateCommitedResource keeps failing with DXGI_ERROR_DEVICE_REMOVED and the removal reason being DXGI_ERROR_ACCESS_DENIED. I've been…
'SysListView32' Bug with multiple items selection: still not fixed in Windows 11 23H2
When I use our own 32 bit application, the mouse cursor still jumps to a corner when I do the lasso selection in a listview (click and drag a rectangle to select multiple listview items). From what I've found in the internet, the program might use a…
Decryption failure error with crypt32.dll, CertGetSubjectCertificateFromStore API
We have an application which transfer EDI documents using AS2 protocol where when our business partner and send data to us, we can’t decrypt it. We are reading the certificate from windows certificate store using CertGetSubjectCertificateFromStore api…
Why GetPerTcpConnectionEStats always return strange value.
I have following code to read TCP congestion stats: Tried a whole day, the read out path_rod is always strange, like: What should I try next?
How to use function `CreateIconIndirect` with 32 bit bitmaps?
Most icon related documentation is still written with the assumption that the user will want to create a black and white icon, even though we are in the year 2024. A 32 bit bitmap has both the color information and the transparency mask in the same…
How can I mark my structure as `com_class` in Rust?
Hello, I am implementing a COM object in DLL in Rust. Every single tutorial I found (including ChatGPT and Github Copilot) describes that I need to use #[com_class] macro with my CLSID over my…
CoreWebView2.NavigateToString(String) method fails to load an HTML page
I am using an instance of WebView2 class to display some HTML content in a UI panel for a VS 2022 extension. I can retrieve the HTML content that I want to display in the WebView2 control as a string, and then I am trying to use…
how to create ID2D1Bitmap using direct2d?
how to load bitmap there is png file and how to create ID2D1Bitmap?
How to handle touch device mapping in multi-monitor setups using Windows API?
When the Windows settings are adjusted to use only the external monitor, my application—designed for hardware diagnostics and reliant on the Windows API—still allows the touchscreen module to be activated and tested. This is problematic because the…
Win32 Console Input: How to differentiate between 0xE0 as a Start-Of-Sequence and 0xE0 as the 1st byte of a UTF-8 sequence/as a codepage character?
I use _getch() for reading input character by character, but there seems to be no way to tell whether the next character still belongs to the last read character or not. It seems that there is no way to tell if a 0xE0 is the 1st of two bytes in a…
How to get policy value after set?
Hi, Is there a way to check if the state has been assigned? I tried this but the return value of v=11 DWMNCRENDERINGPOLICY v; auto k = DwmGetWindowAttribute(hwnd, DWMWA_NCRENDERING_POLICY, &v, 4); <- v return 11. BOOL v; auto k =…
How to make XAudio2 throw a Device Lost flag/error?
Hi, I was wondering how I can produce a Device Lost message for XAudio2. I tried using the dxcaps -forcetdr command in the Developer Command Prompt window for Visual Studio, but it did not work. I am using C++ and programming for Windows 10. Derek
SetLayeredWindowAttributes() is no work
this winapi <SetLayeredWindowAttributes()> in d3d12 is no work , but it in d3d9-11 is work , i want to use in d3d12 , why dose this problem arise ? what should i do ?
how to read txt file which has char or unicode ?
I can not use std::fstream right? If I set locale I can not read normal char If I do not set it I can not read unicode bytes.
the bitmap was blank which create from duplication?
I create bitmap from desktop duplication but it is blank of black. hr = dxgiOutputDuplication->AcquireNextFrame(500, &frame_info1, &resource); ID3D11Texture2D* texture1 = NULL; hr = resource->QueryInterface(__uuidof(ID3D11Texture2D),…
CreateProcess on notepad.exe fails due to a crash in ApiSetHost.AppExecutionAlias.dll
Hi guys, First time I do a question here so hope it is in the right format. We have encountered a problem in which when calling CreateProcess() on notepad.exe fails due to a crash in ApiSetHost.AppExecutionAlias.dll. While have a couple of settings in…