Hooking up component unregister to regxpcom.

git-svn-id: svn://10.0.0.236/trunk@66259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dp%netscape.com
2000-04-18 06:20:35 +00:00
parent 1feacc8f9f
commit 49fb90b6c9

View File

@@ -79,13 +79,22 @@ nsresult Register(const char *path)
nsresult Unregister(const char *path)
{
/* NEEDS IMPLEMENTATION */
#if 0
nsresult res = nsComponentManager::AutoUnregisterComponent(path);
return res;
#else
return NS_ERROR_FAILURE;
#endif
nsCOMPtr<nsILocalFile> spec;
nsresult rv = nsComponentManager::CreateInstance(NS_LOCAL_FILE_PROGID,
nsnull,
NS_GET_IID(nsILocalFile),
getter_AddRefs(spec));
if (NS_FAILED(rv) || (!spec))
{
printf("create nsILocalFile failed\n");
return NS_ERROR_FAILURE;
}
rv = spec->InitWithPath((char *)path);
if (NS_FAILED(rv)) return rv;
rv = nsComponentManager::AutoUnregisterComponent(nsIComponentManager::NS_Startup, spec);
return rv;
}
int ProcessArgs(int argc, char *argv[])