Re: GetNameForIID/GetInfoForIID fails...

Georgios Petasis <[email protected]> Thu, 20 Oct 2011 20:00:04 +0300
Newsgroups gmane.comp.mozilla.devel.embedding
Organization NCSR "Demokritos"
Message-ID <[email protected]>
It seems that NS_InitXPCOM2(nsnull, nsnull, nsnull); was the problem. 
Providing the directory of xulrunner, made the code work...

George
Στις 20/10/2011 00:34, ο/η Georgios Petasis έγραψε:
> Hi all,
>
> I am trying to revive some old code not written by me, that used 
> XPTI_GetInterfaceInfoManager(), but I haven't succeeded finding an 
> alternative that works:
>
> nsIInterfaceInfoManager *manager = nsnull;
> nsIID nsisupports_iid = NS_ISUPPORTS_IID;
> nsIInterfaceInfo *nsisupports_info = nsnull;
>
> NS_InitXPCOM2(nsnull, nsnull, nsnull);
> res = NS_GetServiceManager(&servmanager);
> if (NS_FAILED(res)) {...}
> // manager = XPTI_GetInterfaceInfoManager();
> res = CallGetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID, 
> &manager);
> if (NS_FAILED(res)) {...} // This seems to work.
> res = manager->GetInfoForIID(&nsisupports_iid, &nsisupports_info); // 
> this fails.
>
> Any idea why?
>
> George
> _______________________________________________
> dev-embedding mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-embedding
>

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding