printerNameWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv);
nsPrinterListEnumerator::GetNext(nsISupports **aPrinter){  if (mIndex >= mCount) {    return NS_ERROR_UNEXPECTED;  }  PRUnichar *printerName = mPrinters[mIndex++];  nsCOMPtr<nsISupportsString> printerNameWrapper;  nsresult rv;  printerNameWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);  NS_ENSURE_SUCCESS(rv, rv);  printerNameWrapper->SetData(nsDependentString(printerName));  *aPrinter = NS_STATIC_CAST(nsISupports*, printerNameWrapper);  NS_ADDREF(*aPrinter);  return NS_OK;}