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 04f9c4b5e0
commit 366167c88b

View File

@ -140,7 +140,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) {