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…
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…
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…
Potential bug in Windows Media Foundation about seekable IMFByteStream (regression from Windows 7)
I have a minimal sample code that is using Microsoft Media Foundation It works perfectly well under W7, it fails with an error on W10+ The code : opens an existing (valid) *.avi file to create a readonly IMFByteStream tries to create an IMFMediaSource…
Taskbar (Shell_TrayWnd) Alignment of items using Win32 API
Currently, I have a problem with changing the alignment of items such as Start Button, Search, Pinned items. I wrote code, which works in a Console Application, but it won't work in a WinUI 3 or UWP Packaged Desktop application because of restrictions…
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
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…
Documentation clarification for MF_MT_AUDIO_AVG_BYTES_PER_SECOND for AAC encoder
The documentation here: https://learn.microsoft.com/en-us/windows/win32/medfound/aac-encoder States that for AAC encoding the valid values for **MF_MT_AUDIO_AVG_BYTES_PER_SECOND **are 12000, 16000, 20000, 24000. It then says that * 6 those values should…
Why GetBestInterfaceEx doesn't consider routes added via command line?
Consider the case where there are two network interfaces connected to the system (Ethernet and WiFi). Both will add 0.0.0.0/0 route in the routing table but, one of the interface will have a lower metric (say Ethernet gets the lower metric).…
Not able to create new object of DesktopWindowXamlSource after closing one
Hi, I'm working on Win32 application with Xaml Island. I'm facing the issue with DesktopWindowXamlSource. If I create two objects of DesktopWindowXamlSource, it's working as expected. However, If I create one object and close it using Close() method.…
How can I be sure my Windows desktop application is signed with a timestamp?
We use DigiCert to create certificates for our Windows desktop apps. The certificate expires in June, and I want to make sure this won't impact the users on the existing versions they use, and the digital signature on the file will remain valid even…
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…
Direct2D drawing quality is inconsistent
This is the result drawn in the window(HwndRenderTarget) This is the result of drawing in WicBitmapRenderTarget
How do i get information about language settings, codepageinfo from WINAPI?
I'm trying to get information about the Windows language settings. In Windows 11, how can I get information about the language settings on Windows and what information do I need to get? I've found "winnls.h", and am referencing it but i have a…
Finding window element using MSAA
I'm trying to detect the "Previous" and "Next" buttons of the Spofity MiniPlayer window using MSAA, however, sometimes these buttons don't get detected, I don't understand why, it's like luck, I need to reopen the window uncountable…
When will `CF_CALLBACK_TYPE_NOTIFY_DEHYDRATE` be invoked
When the user clicks Free up space in the Explorer menu, CF_CALLBACK_TYPE_NOTIFY_DEHYDRATE and CF_CALLBACK_TYPE_NOTIFY_DEHYDRATE_COMPLETION are not invoked. In the Cloud Mirror Sample, it uses ReadDirectoryChangesW and checks FILE_ATTRIBUTE_UNPINNED flag…
When will `CF_CALLBACK_TYPE_NOTIFY_RENAME_COMPLETION` be invoked
I am implemented CF_CALLBACK_TYPE_NOTIFY_RENAME and response successful status but CF_CALLBACK_TYPE_NOTIFY_RENAME_COMPLETION is not invoked. Is this expected or is something going wrong?
Open any file
Which API to use? You can call the system to open the specified file. I tried to use the call browser to open the full path (with file://) but some files open in a non-standard way (e.g., MP3 files won't play in win11).
How to Utilize SetColor(Windows::UI::Colors::Red) from a Non-UWP and Non-C++/WinRT DLL File
Hi, I have developed a C++ DLL without utilizing UWP or C++/WinRT. Within this DLL, I am employing Windows::Devices::Lights::LampArray^ lamp to retrieve information about the lamp, such as lamp->IsConnected, lamp->LampCount, and…
WSUSSCN2.cab file for Windows 11
I have been using a the wsusscn2.cab file and WUA in a script for years to determine the latest non-superseded applicable UpdatesIDs so that I can download them and bring them to my offline networks. Now that we are moving to Windows 11 it seems to me…