Search code examples
c++internet-explorerwebbrowser-controliwebbrowser2

Detecting whether cookies are enabled through IWebBrowser2 Interface


Is it possible to detect whether cookies are enabled in Internet Explorer through the IWebBrowser2 Interface or through some other WebBrowser Control C/C++ interface? I can't see any obvious way to do it, but was wondering whether there is a subtle way.


Solution

  • You can pass the URL to InternetGetPerSiteCookieDecision() and it should tell you what the policy is for that site.

    It is a pretty terribly named API. :-/