internal static bool isEnabled(InternetFeatureList feature, GetFeatureFlag flags) { int HRESULT = CoInternetIsFeatureEnabled(feature, (int)flags); //If the HRESULT is 0 or positive (a success code), the method //returns without creating or throwing an exception: Marshal.ThrowExceptionForHR(HRESULT); return(HRESULT == Interop.S_OK); }
public static bool IsEnabled(InternetFeatureList feature, GetFeatureFlag flags) { if (!OSHelper.IsOSAtLeastWindowsXPSP2 && !OSHelper.IsIE6) { return(false); } return(NativeMethods.isEnabled(feature, flags)); }