Exemplo n.º 1
0
 public static void SetEnabled(InternetFeatureList feature, SetFeatureFlag flags, bool enable)
 {
     if (OSHelper.IsOSAtLeastWindowsXPSP2 && OSHelper.IsIE6)
     {
         NativeMethods.setEnabled(feature, flags, enable);
     }
 }
Exemplo n.º 2
0
            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);
            }
Exemplo n.º 3
0
            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);
            }
Exemplo n.º 4
0
        public static bool IsEnabled(InternetFeatureList feature, GetFeatureFlag flags)
        {
            if (!OSHelper.IsOSAtLeastWindowsXPSP2 && !OSHelper.IsIE6)
            {
                return(false);
            }

            return(NativeMethods.isEnabled(feature, flags));
        }
Exemplo n.º 5
0
 private static extern int CoInternetSetFeatureEnabled(
     InternetFeatureList FeatureEntry,
     [MarshalAs(UnmanagedType.U4)] int dwFlags,
     [MarshalAs(UnmanagedType.Bool)] bool fEnable);
Exemplo n.º 6
0
 private static extern int CoInternetIsFeatureEnabled(
     InternetFeatureList FeatureEntry,
     [MarshalAs(UnmanagedType.U4)] int dwFlags);