nsCOMPtr <nsICmdLineHandler> handler(do_GetService(contractID, &rv));
nsCOMPtr <nsICmdLineService> cmdLine = do_GetService("@mozilla.org/appshell/commandLineService;1", &rv);
nsresult LaunchApplication(const char *contractID, PRInt32 height, PRInt32 width){  nsresult rv = NS_OK;  nsCOMPtr <nsICmdLineHandler> handler(do_GetService(contractID, &rv));  if (NS_FAILED(rv)) return rv;  if (!handler) return NS_ERROR_FAILURE;  nsXPIDLCString chromeUrlForTask;  rv = handler->GetChromeUrlForTask(getter_Copies(chromeUrlForTask));  if (NS_FAILED(rv)) return rv;  PRBool handlesArgs = PR_FALSE;  rv = handler->GetHandlesArgs(&handlesArgs);  if (handlesArgs) {    nsXPIDLString defaultArgs;    rv = handler->GetDefaultArgs(getter_Copies(defaultArgs));    if (NS_FAILED(rv)) return rv;    rv = OpenWindow(chromeUrlForTask, defaultArgs);  }  else {    rv = OpenChromeURL(chromeUrlForTask, height, width);  }  return rv;}