mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
SysInfo: Make INTERNET_CONNECTIVITY and LAN_CONNECTIVITY return 1 on unsupported systems
This commit is contained in:
parent
a95c0a9284
commit
b25a7849d6
@ -527,7 +527,11 @@ LPCWSTR GetPlatformName()
|
||||
|
||||
NLM_CONNECTIVITY GetNetworkConnectivity()
|
||||
{
|
||||
NLM_CONNECTIVITY connectivity = NLM_CONNECTIVITY_DISCONNECTED;
|
||||
// This is initialized like this in case INetworkListManager is not available (i.e. on WinXP).
|
||||
// In such cases, we simply assume that there is an internet connection.
|
||||
NLM_CONNECTIVITY connectivity =
|
||||
(NLM_CONNECTIVITY)((int)NLM_CONNECTIVITY_IPV4_INTERNET | (int)NLM_CONNECTIVITY_IPV4_LOCALNETWORK);
|
||||
|
||||
INetworkListManager* nlm;
|
||||
HRESULT hr = CoCreateInstance(
|
||||
CLSID_NetworkListManager, NULL, CLSCTX_INPROC_SERVER, __uuidof(INetworkListManager), (void**)&nlm);
|
||||
|
Loading…
Reference in New Issue
Block a user