I found a bug in Windows 11's ISystemInformation::get_RebootRequired()
. Where can I report it?
Environment: Windows 11
Steps to reproduce
Expected behavior: The application prints "-1" (VARIANT_TRUE).
Observed behavior: The application prints "0" (VARIANT_FALSE).
Appendix A: Code sample
#include <iostream>
#include <Windows.h>
#include <wuapi.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlcomcli.h>
int IsWindowsUpdateRebootPending()
{
VARIANT_BOOL isWindowsRebootPending = VARIANT_FALSE;
std::string errorMessage;
CComPtr<ISystemInformation> systemInformation(nullptr);
HRESULT result = CoCreateInstance(CLSID_SystemInformation, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARGS(&systemInformation));
if (FAILED(result) || systemInformation == nullptr)
{
errorMessage = "CoCreateInstance(CLSID_SystemInformation) failed.";
}
else if (systemInformation->get_RebootRequired(&isWindowsRebootPending) != S_OK)
{
errorMessage = "get_RebootRequired failed.";
}
if (!errorMessage.empty())
{
throw std::runtime_error(errorMessage);
}
return (int)isWindowsRebootPending;
}
int main()
{
::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
try
{
std::cout << IsWindowsUpdateRebootPending() << std::endl;
}
catch (std::exception e)
{
std::cout << e.what() << std::endl;
}
::CoUninitialize();
return 0;
}
Update 1: @SimonMourier suggested another way to test ISystemInformation::get_RebootRequired() in the comments below. The observed behavior is the same.
I ended up submitting a ticket through Feedback Hub. Here is how I did it: Windows Start > Feedback hub > Sign In > Report a problem. After describing the problem I classified it as "Developer Platform, API Feedback".