m_doneSoFar = 0; nsOEAddressIterator * pIter = new nsOEAddressIterator( m_pWab, destination); m_pWab->IterateWABContents( pIter, &m_doneSoFar); delete pIter;
nsCOMPtr<nsIStringBundle>	bundle( dont_AddRef( nsOEStringBundle::GetStringBundleProxy())); nsString	success; nsString	error; if (!source || !destination || !fatalError) { nsOEStringBundle::GetStringByID( OEIMPORT_ADDRESS_BADPARAM, error, bundle); if (fatalError) *fatalError = PR_TRUE; ImportOEMailImpl::SetLogs( success, error, errorLog, successLog); return NS_ERROR_NULL_POINTER; }  m_doneSoFar = 0; nsOEAddressIterator * pIter = new nsOEAddressIterator( m_pWab, destination); HRESULT hr = m_pWab->IterateWABContents( pIter, &m_doneSoFar); delete pIter;  nsString	name; if (SUCCEEDED(hr)) { nsXPIDLString pName; if (NS_SUCCEEDED( source->GetPreferredName(getter_Copies(pName)))) { name = pName; ReportSuccess( name, &success); } } else ImportOEMailImpl::ReportError( OEIMPORT_ADDRESS_CONVERTERROR, name, &error);  ImportOEMailImpl::SetLogs( success, error, errorLog, successLog);
NS_IMETHODIMP ImportOEAddressImpl::ImportAddressBook(	nsIImportABDescriptor *source, 													nsIAddrDatabase *	destination, 													nsIImportFieldMap *	fieldMap, 													PRBool isAddrLocHome, 													PRUnichar **		errorLog,													PRUnichar **		successLog,													PRBool *			fatalError){    NS_PRECONDITION(source != nsnull, "null ptr");    // NS_PRECONDITION(destination != nsnull, "null ptr");    // NS_PRECONDITION(fieldMap != nsnull, "null ptr");    NS_PRECONDITION(fatalError != nsnull, "null ptr");    if (!source || !fatalError)        return NS_ERROR_NULL_POINTER;	// we assume it is our one and only address book.	if (!m_pWab) {		IMPORT_LOG0( "Wab not loaded in ImportAddressBook call\n");		return( NS_ERROR_FAILURE);	}        IMPORT_LOG0( "IMPORTING OUTLOOK EXPRESS ADDRESS BOOK\n");    m_doneSoFar = 0;    nsOEAddressIterator * pIter = new nsOEAddressIterator( m_pWab, destination);    m_pWab->IterateWABContents( pIter, &m_doneSoFar);    delete pIter;      nsresult rv = destination->Commit(nsAddrDBCommitType::kLargeCommit);	return rv;}