title: CoInternetSetFeatureEnabled with FEATURE_BLOCK_INPUT_PROMPTS does not work
body: <p>I am trying to use CoInternetSetFeatureEnabled API for blocking <a href="http://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt" rel="nofollow">prompt dialog</a> as it show below in application that hosts WebBrowser control, but it does not work. Updating registry does not work either, following <a href="http://msdn.microsoft.com/en-us/library/ee330732%28v=vs.85%29.aspx" rel="nofollow">MSDN - Internet Feature Controls (I..L)</a>. I am using IE9 on Win7 64 bit.</p>
  
  <blockquote>
    <p>FEATURE_BLOCK_INPUT_PROMPTS Internet Explorer 7. Enable or disable the
    pop-up blocker to show input prompt dialog boxes. Used pop-up blocker
    to mitigate the risk of spoofing.</p>
  </blockquote>
  
  <pre><code>private const int FEATURE_BLOCK_INPUT_PROMPTS = 27;
  
  [DllImport("urlmon.dll")]
  [PreserveSig]
  [return: MarshalAs(UnmanagedType.Error)]
  public static extern int CoInternetSetFeatureEnabled(
      int FeatureEntry,
      [MarshalAs(UnmanagedType.U4)] int dwFlags,
      bool fEnable);
  
  public static int disableInputPrompts(bool state)
  {
      return CoInternetSetFeatureEnabled(
         FEATURE_BLOCK_INPUT_PROMPTS, SET_FEATURE_ON_PROCESS, state);
  }
  </code></pre>
  
  <p><strong>Update</strong> Just have tried in WinXP with IE8 and this feature is working. Does it depends on something else?</p>
  
  <p><strong>Update</strong> According to msdn this feature is by default enabled in IE9 but it does not work. Clicking on "Try It" button in <a href="http://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt" rel="nofollow">w3schools sample</a> initiates the prompt dialog, is that a security bug?</p>
  
  <blockquote>
    <p>By default, this feature is enabled for Internet Explorer and disabled for
    applications hosting the WebBrowser Control.</p>
  </blockquote>
  
  <p>Any working alternative on how to block prompt dialog in WebBrowser control?</p>
  
  <p>Can this be done by implementing custom security manager IInternetSecurityManager?</p>