43,730 questions
0
votes
1
answer
91
views
Including Windows.h is producing errors of: 'byte': ambiguous symbol [duplicate]
I'm getting many errors of the following type. Clearly, Microsoft has a definition of byte that clashes with Standard C++'s definition of std::byte (after a using namespace std, that I use in ...
0
votes
1
answer
49
views
Win32 C++: Error in CComPtr Release(): ATL::_NoAddRefReleaseOnCComPtr<T> in "atlcomcli.h" is inaccessible
I'm writing a Win32 C++ function to iterate Portable Devices. After successfully opening and connecting to the device, I need to release it. (There's also a Close() but Microsoft's documentation ...
1
vote
0
answers
63
views
EvtSubscribe causes some events to be missed
I want to write a small program to work with the EvtSubscribe function. However, I encountered a problem. Every time the callback function is called, I print a message to the screen and then call ...
0
votes
0
answers
76
views
Get path of Portable Device file to enable Copy/Paste
In a previous thread I asked about listing real filenames stored on a Portable Device (e.g. an MTP Digital Camera). Per my answer I can now traverse the file system and display real filenames.
Now I ...
0
votes
0
answers
179
views
Monitoring changes to variables programmatically
This is a follow up to my previous question about creating a debugger for C source files in Python. The current issue I am facing is monitoring changes to variables. I want to monitor 8 variables say ...
1
vote
1
answer
62
views
Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken throws exception
I'm trying to get a hardware id with a .net console app (target framewotk is net8.0-windows10.0.17763.0).
The code is rather trivial, just
var token = Windows.System.Profile.HardwareIdentification....
0
votes
1
answer
119
views
Windows 11 raw input API bad performance compared to Windows 10 [closed]
With my code which is just a regular RAW input example.... WM_INPUT, RIM_TYPEMOUSE... I'm getting on Windows 10 the full 1,000Hz of my mouse and on Windows 11 I'm getting about 128Hz.
How to fix this ...
2
votes
0
answers
88
views
How do I send arguments to application in windows launched with shell:appsFolder?
I know you can use the Get-AppxPackage and Get-AppxPackageManifest cmdlets in Powershell to get the package family and it's specific application entry point.
In this example with Windows Media Player ...
0
votes
1
answer
70
views
WriteFile failure when networkshare is disconnected
I have a win32 app opening a log file on a network share using CreateFile and WriteFile (non overlapped) to write records. What I am seeing when the network share is lost, WriteFile reports an error (...
0
votes
0
answers
146
views
Which window can I passing a `WM_SYSCOMMAND` to carry out system commands?
An application can carry out any system command at any time by passing a WM_SYSCOMMAND message to DefWindowProc.
If I don't have any windows, which window can I post/send WM_SYSCOMMAND to carry out ...
1
vote
1
answer
88
views
Standard way to normalize mouse wheel input across devices and platforms?
If I want consistent scrolling behavior across platforms and different wheel resolutions, I need a way to make wheel input independent of the device’s physical precision.
Different mice seem to have ...
0
votes
0
answers
167
views
How to turn off Display on Windows, Without affecting GUI apps running
I am running a GUI app on a Windows device. The main thread for this is the UI thread. I'm adding functionality to turn off the display when the application is not being used for a certain time.
I ...
3
votes
1
answer
91
views
Flickering when drawing to IDCompositionSurface
I tried drawing a rounded rectangle via the renderTarget, but encountered an issue where the image disappears every other frame—what could be the cause?
#include <d2d1_1.h>
#include <d2d1_2.h&...
0
votes
0
answers
86
views
Shell_NotifyIcon(NIM_MODIFY, NIF_INFO) returns TRUE but no balloon/notification is shown (tray icon)
I'm implementing a tray icon for my game launcher on Windows (C++, Win32 API). The tray icon itself works fine: it appears in the system tray, I can right-click it to show a context menu, and double-...
-1
votes
0
answers
95
views
ProcessID from ETW always return 0xFFFFFFFF
I am using Event Tracing for Windows to monitor disk io and network usage of processes. I have used ETW with KERNEL_LOGGER_NAME , EVENT_TRACE_FLAG_PROCESS , EVENT_TRACE_FLAG_DISK_IO, ...