Open
Description
Describe the bug
So I am using RegGetValue()
to poll registry values. And when changes are made to the value, the polling result returned is completely unpredictable in wasdk packaged app
Steps to reproduce the bug
- Create a C++ winui3 packaged app (without a Windows application packaging project)
- Add this code in
MainWindow.xaml
constructor
MainWindow()
{
std::thread{ [] {
while (true)
{
DWORD value;
DWORD size = sizeof(value);
RegGetValueW(
HKEY_CURRENT_USER,
LR"(Software\Microsoft\Windows\DWM)",
L"AccentColor",
RRF_RT_REG_DWORD,
nullptr,
&value,
&size
);
OutputDebugString(std::format(L"{}\n", value).data());
Sleep(1000);
}
} }.detach();
}
- Use the same code in a C++ console application project
- Build and run both, now go to windows personalization settings, change the accent color, observe the output from both. See how they diverge. Open up a
regedit
you can see the console application is returning the correct result.
Expected behavior
No response
Screenshots
NuGet package version
Windows App SDK 1.6.3: 1.6.250108002
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 24H2 (22621, October 2024 Update)
IDE
Visual Studio 2022
Additional context
At this point, I don't even know what to expect. I thought at least polling should work for me to workaround #4075