0

I have an IE addon written in C++ using BHO with which I want to use Log4net to introduce logging into the addon. I don't intend to have any UI (dropdown etc) for this plugin. Therefore, to enable, disable and set log levels, what options do I have? The two options I thought include getting configs from a file (with some caveats when running in protected mode). Second option I read somewhere, was to load a URL, through which I can pass my arguments. For eg, I just read the first URL on IE startup and if it matches a particular string, I use it to set my arguments for logging for that session (otherwise use default).

Any other better option?

Thanks!

Wahaj Ali
  • 4,093
  • 3
  • 23
  • 35

1 Answers1

0

Another way is to store settings in registry. There are also some caveats here with the protected mode, but they are almost deterministic so it is a usable way for turning logging on/off.

In protected mode IE will map your registry brunch here: HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\InternetRegistry Please note, that such a redirecting will work only for HKCU, not for HKLM

Serg
  • 3,454
  • 2
  • 13
  • 17