后面再整理

HRESULT hr;
ULONG cValues = 0;
SPropValue *pspvEmail = NULL;
//短信手机号码
SizedSPropTagArray(1, sptaEmail) = { 1, PR_SENDER_EMAIL_ADDRESS};
hr = pMsg->GetProps((SPropTagArray *) &sptaEmail, MAPI_UNICODE, &cValues, &pspvEmail);
MessageBox( NULL, pspvEmail->Value.lpszW, NULL, MB_OK );

//短信内容
//SizedSPropTagArray(1, sptaEmail) = { 1, PR_SUBJECT};
hr = pMsg->GetProps((SPropTagArray *) &sptaEmail, MAPI_UNICODE, &cValues, &pspvEmail);
MessageBox( NULL, pspvEmail->Value.lpszW, NULL, MB_OK );

//短信接收时间
SizedSPropTagArray(1, sptaEmail) = { 1, PR_MESSAGE_DELIVERY_TIME };
hr = pMsg->GetProps((SPropTagArray *) &sptaEmail, MAPI_UNICODE, &cValues, &pspvEmail);

//格式化时间
FILETIME ft;
SYSTEMTIME st;
TCHAR szTime[MAX_PATH];
FileTimeToLocalFileTime(&pspvEmail->Value.ft,&ft);
FileTimeToSystemTime(&ft,&st);
wsprintf(szTime,_T("%d:%d:%d"),st.wHour,st.wMinute,st.wSecond);
MessageBox( NULL, szTime, NULL, MB_OK );

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yzx0023/archive/2005/08/11/451643.aspx

你可能感兴趣的:(null,手机,Path,email)