Problem with pre?erences
"Ilia Dolganev" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.prefs |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
HI!
I have following problem. I need to get preferences of current profile:
c:\Documents and Settings\[Windows Login Name]\Application
Data\Mozilla\Profiles\[profile name]\[random string].slt\ prefs.js
Here is the code I wrote:
NS_InitEmbedding(nsnull, nsnull);
nsCOMPtr<nsIPrefService> prefService =
do_GetService(NS_PREFSERVICE_CONTRACTID);
if(prefService)
{
nsCOMPtr<nsIPrefBranch> prefBranch;
rv =
prefService->GetBranch("network.proxy.",getter_AddRefs(prefBranch));
if(NS_SUCCEEDED(rv))
{
char* sStr;
rv = prefBranch->GetCharPref("http", &sStr);
}
else {...}
}
else {...}
This code return preferences from C:\program
files\Netscape\defaults\pref\all.js
but these preferences are not of current profile.
I've no idea what to do.