nsString fullName = pName;
nsString fullName; fullName.AssignWithConversion(pName);
void OESettings::SetIdentities( nsIMsgAccountManager *pMgr, nsIMsgAccount *pAcc, HKEY hKey){	// Get the relevant information for an identity	char *pName = (char *)nsOERegUtil::GetValueBytes( hKey, "SMTP Display Name");	char *pServer = (char *)nsOERegUtil::GetValueBytes( hKey, "SMTP Server");	char *pEmail = (char *)nsOERegUtil::GetValueBytes( hKey, "SMTP Email Address");	char *pReply = (char *)nsOERegUtil::GetValueBytes( hKey, "SMTP Reply To Email Address");	char *pUserName = (char *)nsOERegUtil::GetValueBytes( hKey, "SMTP User Name");	nsresult	rv;	if (pEmail && pName && pServer) {		// The default identity, nor any other identities matched,		// create a new one and add it to the account.		nsCOMPtr<nsIMsgIdentity>	id;		rv = pMgr->CreateIdentity( getter_AddRefs( id));		if (id) {			nsString fullName = pName;			id->SetFullName( fullName.GetUnicode());			id->SetIdentityName( fullName.GetUnicode());			id->SetEmail( pEmail);			if (pReply)				id->SetReplyTo( pReply);			pAcc->AddIdentity( id);			IMPORT_LOG0( "Created identity and added to the account\n");			IMPORT_LOG1( "\tname: %s\n", pName);			IMPORT_LOG1( "\temail: %s\n", pEmail);		}	}		SetSmtpServer( pMgr, pAcc, pServer, pUserName);	nsOERegUtil::FreeValueBytes( (BYTE *)pName);	nsOERegUtil::FreeValueBytes( (BYTE *)pServer);	nsOERegUtil::FreeValueBytes( (BYTE *)pEmail);	nsOERegUtil::FreeValueBytes( (BYTE *)pReply);	nsOERegUtil::FreeValueBytes( (BYTE *)pUserName);}