Hi all, I'm trying to write an Windows C++ application that can read the Firefox cache entries. This is a separate process, not a Firefox extension. I'm trying to use the XPCOM standalone glue and the binaries from the XUL Runner 1.8.1.3 package to do this. Is this possible? My current code: rv = XPCOMGlueStartup(cXULPath); if (NS_FAILED(rv)) return false; nsCOMPtr<nsIServiceManager> servMan; rv = NS_InitXPCOM2(getter_AddRefs(servMan), nsnull, nsnull); if (NS_FAILED(rv)) return false; nsCOMPtr<nsICacheService> cacheService; rv = servMan->GetServiceByContractID(NS_CACHESERVICE_CONTRACTID, NS_GET_IID(nsICacheService), getter_AddRefs(cacheService)); if (NS_FAILED(rv)) return false; rv = cacheService->VisitEntries(this); if (NS_FAILED(rv)) return false; The VisitDevice function in the nsICacheVisitor gets called, but there are no cache entries. It seems like I need to somehow set the Profile directory so the CacheVisitor looks in the correct place. Unfortunately, I can't seem to figure out how to do this. I tried to use the nsIProperties interface of the Directory Service to set NS_APP_USER_PROFILE_LOCAL_50_DIR to a specific profile directory under Documents and Settings\[username]\Local Settings\Application Data\Mozilla\Firefox\Profiles, but that didn't seem to affect the CacheVisitor. Is there any way to set the Profile to the correct Firefox directory just using the standalone glue lib? Or is there another way to read through the cache entries for a specific Firefox Profile? Any help you can provide would be great as I've been stumped for days trying to get this to work. Thanks.
_______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
