void MeasureNet::InitializeStatic() { if (GetRainmeter().GetDebug()) { UpdateIFTable(); } }
void MeasureNet::InitializeStatic() { if (IsWindowsVistaOrGreater()) { HMODULE IpHlpApiLibrary = GetModuleHandle(L"IpHlpApi.dll"); if (IpHlpApiLibrary) { c_GetIfTable2 = (decltype(c_GetIfTable2))GetProcAddress(IpHlpApiLibrary, "GetIfTable2"); c_FreeMibTable = (decltype(c_FreeMibTable))GetProcAddress(IpHlpApiLibrary, "FreeMibTable"); } if (!c_GetIfTable2 || !c_FreeMibTable) { c_GetIfTable2 = nullptr; c_FreeMibTable = nullptr; } } if (GetRainmeter().GetDebug()) { UpdateIFTable(); } }
/* ** Prepares in order to use the new APIs which are available on Vista or newer. ** */ void CMeasureNet::InitializeNewApi() { if (CSystem::GetOSPlatform() >= OSPLATFORM_VISTA) { HMODULE IpHlpApiLibrary = GetModuleHandle(L"IpHlpApi.dll"); if (IpHlpApiLibrary) { c_GetIfTable2 = (FPGETIFTABLE2)GetProcAddress(IpHlpApiLibrary, "GetIfTable2"); c_FreeMibTable = (FPFREEMIBTABLE)GetProcAddress(IpHlpApiLibrary, "FreeMibTable"); } if (!c_GetIfTable2 || !c_FreeMibTable) { c_GetIfTable2 = NULL; c_FreeMibTable = NULL; } } if (Rainmeter->GetDebug()) { UpdateIFTable(); } }
/* ** Prepares in order to use the new APIs which are available on Vista or newer. ** */ void CMeasureNet::InitializeStatic() { if (Platform::IsAtLeastWinVista()) { HMODULE IpHlpApiLibrary = GetModuleHandle(L"IpHlpApi.dll"); if (IpHlpApiLibrary) { c_GetIfTable2 = (FPGETIFTABLE2)GetProcAddress(IpHlpApiLibrary, "GetIfTable2"); c_FreeMibTable = (FPFREEMIBTABLE)GetProcAddress(IpHlpApiLibrary, "FreeMibTable"); } if (!c_GetIfTable2 || !c_FreeMibTable) { c_GetIfTable2 = NULL; c_FreeMibTable = NULL; } } if (Rainmeter->GetDebug()) { UpdateIFTable(); } }