nsIComponentManagerObsolete* compMgr; if(NS_FAILED(NS_GetGlobalComponentManager((nsIComponentManager**)&compMgr)) || !compMgr || NS_FAILED(compMgr->IsRegistered(id, &registered)))
nsCOMPtr<nsIComponentRegistrar> compMgr; if(NS_FAILED(NS_GetComponentRegistrar(getter_AddRefs(compMgr))) || !compMgr || NS_FAILED(compMgr->IsCIDRegistered(id, &registered)))
IsRegisteredCLSID(const char* str){    PRBool registered;    nsID id;    if(!id.Parse(str))        return PR_FALSE;    nsIComponentManagerObsolete* compMgr;    if(NS_FAILED(NS_GetGlobalComponentManager((nsIComponentManager**)&compMgr)) ||       !compMgr || NS_FAILED(compMgr->IsRegistered(id, &registered)))        return PR_FALSE;    return registered;}