*value = csPromptEditValue.ToNewUnicode();
*value = ToNewUnicode(csPromptEditValue);
NS_IMETHODIMP CPromptService::Prompt(nsIDOMWindow *parent,                                     const PRUnichar *dialogTitle,                                     const PRUnichar *text,                                     PRUnichar **value,                                     const PRUnichar *checkboxMsg,                                     PRBool *checkValue,                                     PRBool *_retval){  ResourceState setState;  USES_CONVERSION;  CWnd *wnd = CWndForDOMWindow(parent);  CPromptDialog dlg(wnd, W2T(dialogTitle), W2T(text),                    text && *text ? W2T(text) : 0,                    checkValue != nsnull, W2T(checkboxMsg),                    checkValue ? *checkValue : 0);  if(dlg.DoModal() == IDOK) {    // Get the value entered in the editbox of the PromptDlg    if (value && *value) {      nsMemory::Free(*value);      *value = nsnull;    }    nsString csPromptEditValue;    csPromptEditValue.AssignWithConversion(dlg.m_csPromptAnswer.GetBuffer(0));    *value = csPromptEditValue.ToNewUnicode();    *_retval = PR_TRUE;  } else    *_retval = PR_FALSE;  return NS_OK;}