*username = csUserName.ToNewUnicode();
*username = ToNewUnicode(csUserName);
NS_IMETHODIMP CPromptService::PromptUsernameAndPassword(nsIDOMWindow *parent,                                                        const PRUnichar *dialogTitle,                                                        const PRUnichar *text,                                                        PRUnichar **username,                                                        PRUnichar **password,                                                        const PRUnichar *checkboxMsg,                                                        PRBool *checkValue,                                                        PRBool *_retval){  ResourceState setState;  USES_CONVERSION;  CWnd *wnd = CWndForDOMWindow(parent);  CPromptUsernamePasswordDialog dlg(wnd, W2T(dialogTitle), W2T(text),                    username && *username ? W2T(*username) : 0,                    password && *password ? W2T(*password) : 0,                     checkValue != nsnull, W2T(checkboxMsg),                    checkValue ? *checkValue : 0);  if (dlg.DoModal() == IDOK) {    // Get the username entered    if (username && *username) {        nsMemory::Free(*username);        *username = nsnull;    }    nsString csUserName;    csUserName.AssignWithConversion(dlg.m_csUserName.GetBuffer(0));    *username = csUserName.ToNewUnicode();    // 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;}