I have the same problem as Anton, and would appreciate any help. I am
trying to port an existing application that embeds mozilla (originally
1.75) over to MacTel. I have moved to using Firefox 1.5 source base to
be able to successfully build a fat binary, and have everything working
now except for profiles. Moving to using XULRunner is too big an
investment for this product that is now in maintenance phase, so any
help with getting this working with the "old" way of embedding would be
great.
I am building the browser, and my options are:
--enable-application=browser
--disable-static
--enable-shared
and I am statically linking to libprofdirserviceprrovidersa_s.a and
appear to succeed when calling NS_NewProfileDirServiceProvider()
followed by profDirServiceProvider->Register(). However, when I try to
get the Profile service from the service manager, I get
NS_ERROR_FACTORY_NOT_REGISTERED.
To get the profile manager, I am doing the following:
nsresult rv;
nsCOMPtr<nsIProfile> profileService;
rv = GetService(NS_PROFILE_CONTRACTID,
NS_GET_IID(nsIProfile),getter_AddRefs(profileService));
where GetService() is implemented as follows:
nsresult GetService(const char *aContractID, const nsIID &aIID,
void **aInstancePtr)
{
nsresult rv;
nsCOMPtr<nsIServiceManager> servMgr;
rv = NS_GetServiceManager(getter_AddRefs(servMgr));
if (NS_FAILED(rv))
return rv;
return servMgr->GetServiceByContractID(aContractID, aIID,
aInstancePtr);
}
I need to support multiple profiles, so what do I need to do to make
this work? I remember seeing comments on a bug report or in
documentation somewhere talking about why a stand-alone profile service
was split off, but I can't seem to find it anymore. Am I using the
right library?
Thanks.
J
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding