public static void SetEnabled(InternetFeatureList feature, SetFeatureFlag flags, bool enable) { if (OSHelper.IsOSAtLeastWindowsXPSP2 && OSHelper.IsIE6) { NativeMethods.setEnabled(feature, flags, enable); } }
internal static void setEnabled(InternetFeatureList feature, SetFeatureFlag flags, bool enable) { int HRESULT = CoInternetSetFeatureEnabled(feature, (int)flags, enable); //If the HRESULT is 0 or positive (a success code), the method //returns without creating or throwing an exception: Marshal.ThrowExceptionForHR(HRESULT); }
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)); }
private static extern int CoInternetSetFeatureEnabled( InternetFeatureList FeatureEntry, [MarshalAs(UnmanagedType.U4)] int dwFlags, [MarshalAs(UnmanagedType.Bool)] bool fEnable);
private static extern int CoInternetIsFeatureEnabled( InternetFeatureList FeatureEntry, [MarshalAs(UnmanagedType.U4)] int dwFlags);