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…
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…
Add a local IPP printer queue programmatically or with Powershell when Windows protected print mode is enabled
After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. The…
Install a local IPP printer queue programmatically or with Powershell when Windows protected print mode is enabled
After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. It…
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…
Issues with WFP engine in Windows 11 24H2 26100.2033 and later
Hi, If this question is not suited for this community, please point me to the correct one. I develop the app which uses WFP (Windows Filtering Platform) capabilities to block UDP traffic for certain applications. Particularly I add a set of network…
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 =…
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?
'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…
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 ?
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…
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…
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…
What does the HRESULT code 0x80193AFC mean?
On Windows 10 Enterprise LTSC Version 1809 Build 17763.6054 I try to run the Windows Win32 API syscall within my rust program: windows::Win32::Management::MobileDeviceManagementRegistration::RegisterDeviceWithManagement This function will register the…
signature verification issue with crypt32.dll CryptMsgControl api
We have an application which transfer EDI documents using AS2 protocol where When we send data to one of our business partner and try to verify the signature of the MDN that business partner return to us and we can`t verify the signature of the MDN that…
Media Foundation AAC encoder trimming early samples and unable to process short files
Hi, We're using Media Foundation to convert WAV files to AAC/MP4 in our asset importer, and we observed that the smallest size of acceptable files increased in the later versions. Previously, we were able to convert files of at least 1025 samples, but…