Hi,
i am getting E_INVALIDARG at line 17. Is there any thing going wrong when
i run this code it shows "bin.cb" equals to a big number and "bin.lpb" is a
a pointer to zero. (using MAPI & WM 5.0)
please help me in this regard... thanks.
------------------------------------------------------------------------------------------------------------------
IMAPITable* pTable1;
enum {ePR_SUBJECT, ePR_ENTRYID, NUM_COLS};
LPSRowSet psrs1 = NULL;
ULONG ulObjType;
LPSRowSet pRows = NULL;
HRESULT hr = pfldrInbox->GetContentsTable(MAPI_DEFERRED_ERRORS, &pTable1);
while (SUCCEEDED(pTable1->QueryRows( 1, 0, &pRows)) && pRows->cRows > 0)
{
// Get the first item in the Inbox and get its entry ID.
// IMessage* lpMessage;
LPMESSAGE lpMessage;
HRESULT hRes = pStore->OpenEntry(pRows->aRow[0].lpProps[ePR_ENTRYID].Value.bin.cb,
(LPENTRYID)pRows->aRow[0].lpProps[ePR_ENTRYID].Value.bin.lpb,
NULL,
MAPI_BEST_ACCESS,
&ulObjType,
(LPUNKNOWN *)&lpMessage); // -----> Error LINE No 17
if (hRes != S_OK) break; << getting hRes == E_INVALIDARG
char* to = NULL, *cc = NULL, *bcc = NULL;
hr = GetRecipients(lpMessage, &to, &cc, &bcc);
}