Talk:Embedding/NewApi/XpcomAccess

From MozillaWiki
Jump to: navigation, search

Hmm... I used the following lines of code to get to nsICategoryManager and it worked fine (after adding the necessary includes), why do I need to use the interface requestor?

 nsCOMPtr<nsICategoryManager> catman;
 catman = nsGetServiceByContractID(NS_CATEGORYMANAGER_CONTRACTID);