GetNameForIID/GetInfoForIID fails...

Georgios Petasis <[email protected]> Thu, 20 Oct 2011 00:34:38 +0300
Newsgroups gmane.comp.mozilla.devel.embedding
Organization NCSR "Demokritos"
Message-ID <[email protected]>
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