1

I have created a Firefox extension and a C++ program:

The extension show some information on a sidebar on Firefox.

The C++ program edit some preferences of the extension in the prefs.js (preferences file of Firefox) when Firefox is in execution:

user_pref("Sidebarinfo.initialize", "true");
user_pref("Sidebarinfo.initdone", "false");
user_pref("Sidebarinfo.usageflag", "eng");
user_pref("Sidebarinfo.userid", "162");
user_pref("Sidebarinfo.originaltime", "1309061712");

So, how can I edit my extension's preferences when Firefox is in execution?

If I edit prefs.js when Firefox is in execution (and only in this case), then Firefox resets prefs.js.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
xRobot
  • 25,579
  • 69
  • 184
  • 304
  • It's similar but not a duplicate http://stackoverflow.com/questions/1774073/what-ipc-method-should-i-use-between-firefox-extension-and-c-sharp-code-running – RedX Apr 23 '12 at 09:19
  • Also: http://stackoverflow.com/questions/8525428/whats-the-best-way-to-communicate-with-a-firefox-addon, http://stackoverflow.com/questions/9561378/communication-from-c-sharp-application-to-firefox-extension. You are approaching your problem from the wrong end. – Wladimir Palant Apr 23 '12 at 11:11

1 Answers1

0

You can't do the communication part that way. It's a settings file, no "communication file". You'll have to read some other file (not sure how far this is possible) with the extension or retrieve some url from a mini http server embedded into the C++ program.

Mario
  • 35,726
  • 5
  • 62
  • 78