*password = csPassword.ToNewUnicode();
*password = ToNewUnicode(csPassword);
NS_IMETHODIMP CPromptService::PromptPassword(nsIDOMWindow *parent,                                             const PRUnichar *dialogTitle,                                             const PRUnichar *text,                                             PRUnichar **password,                                             const PRUnichar *checkboxMsg,                                             PRBool *checkValue,                                             PRBool *_retval){  ResourceState setState;  USES_CONVERSION;  CWnd *wnd = CWndForDOMWindow(parent);  CPromptPasswordDialog dlg(wnd, W2T(dialogTitle), W2T(text),                            password && *password ? W2T(*password) : 0,                            checkValue != nsnull, W2T(checkboxMsg),                            checkValue ? *checkValue : 0);  if(dlg.DoModal() == IDOK) {    // Get the password entered    if (password && *password) {        nsMemory::Free(*password);        *password = nsnull;    }    nsString csPassword;    csPassword.AssignWithConversion(dlg.m_csPassword.GetBuffer(0));    *password = csPassword.ToNewUnicode();    if(checkValue)      *checkValue = dlg.m_bCheckBoxValue;    *_retval = PR_TRUE;  } else    *_retval = PR_FALSE;  return NS_OK;}