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:
parent
04f9c4b5e0
commit
366167c88b
@ -140,7 +140,7 @@ static bool check_internet_connection_win()
|
|||||||
{
|
{
|
||||||
bool internet = true; // return true if COM object creation fails.
|
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;
|
CComPtr<INetworkListManager> pNLM;
|
||||||
if (pNLM.CoCreateInstance(CLSID_NetworkListManager) == S_OK) {
|
if (pNLM.CoCreateInstance(CLSID_NetworkListManager) == S_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user