SendSystemInfoDialog: fixed check of internet connection on Windows:

S_FALSE is returned when COM interface is already initialized, it should be considered a success.
This commit is contained in:
Lukas Matena 2022-05-17 12:13:59 +02:00
parent b27264a8c9
commit 51211e265a

View File

@ -141,7 +141,7 @@ static bool check_internet_connection_win()
{
bool internet = true; // return true if COM object creation fails.
if (CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) == S_OK) {
if (SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) {
{
CComPtr<INetworkListManager> pNLM;
if (pNLM.CoCreateInstance(CLSID_NetworkListManager) == S_OK) {