SRow* lpRow = &lpRowSet->aRow[x]; //Get this specific row
for (ULONG y = 0; y < lpRow->cValues; y++)
{
//Loop through the fields in the address book and assign
//to our variable and put it in the address book variable
SPropValue* lPropVal = &lpRow->lpProps[y];
switch (lPropVal->ulPropTag)
{
case PR_DISPLAY_NAME_A:
thisAddr.DisplayName = lPropVal->Value.lpszA;
//strcpy(thisAddr->DisplayName, lPropVal->Value.lpszA);
break;
case PR_EMAIL_ADDRESS_A:
thisAddr.EmailAddr = lPropVal->Value.lpszA;
if (strchr(thisAddr.EmailAddr.c_str(), '@')==NULL) //replace with empty string
thisAddr.EmailAddr='\0';
//strcpy(thisAddr->EmailAddr, lPropVal->Value.lpszA);
break;
case PR_NICKNAME_A:
thisAddr.NickName = lPropVal->Value.lpszA;
//strcpy(thisAddr->NickName, lPropVal->Value.lpszA);
break;
case PR_BUSINESS_FAX_NUMBER_A:
thisAddr.HFax = lPropVal->Value.lpszA;
default:
break;
}