Guest mia--chan Posted December 18, 2003 Report Posted December 18, 2003 Hi, I need to get the number of SMS in the inbox, on my smartphone 2003. I use the following code (MAPI) : //initialization m_hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); m_hr = MAPIInitialize(NULL); m_hr = MAPILogonEx(NULL,NULL,NULL,NULL,&m_pSession); m_hr = m_pSession->GetMsgStoresTable(MAPI_UNICODE, &m_pMsgStoresTable); //get inbox m_hr = m_pSession->OpenMsgStore(NULL, 0, NULL, NULL, 0, &m_pMsgStore); m_hr = m_pMsgStore->GetProps((LPSPropTagArray) rgTags, MAPI_UNICODE, &cValues, &rgprops); m_hr = m_pMsgStore->OpenEntry(rgprops[0].Value.bin.cb, (LPENTRYID)rgprops[0].Value.bin.lpb, NULL, MAPI_MODIFY, NULL, (LPUNKNOWN*)&m_pInBoxFolder); MAPIFreeBuffer(rgprops); //get messages m_hr = m_pInBoxFolder->GetContentsTable(0, &pContentsTable); m_hr = pContentsTable->GetRowCount(0, &nbMessages); the problem is that the method OpenMsgStore opens the default message store, ActiveSync, when the lpEntryID is NULL. I want to open the SMS message store, but the smartphone 2003 API reference says : HRESULT OpenMsgStore ( ULONG ulUIParam, ULONG cbEntryID, LPENTRYID lpEntryID, LPCIID lpInterface, ULONG ulFlags, LPMDB FAR * lppMDB ); lpEntryID [in] Ignored, set to NULL. How can I open the SMS message store ?
Guest gzytom Posted December 20, 2003 Report Posted December 20, 2003 I have answered your question on smartphonedn :)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now