Applying Restriction on MAPI Table
Hi All,I m trying towrite a sample, whichmovesspecific messages from on folder to another..So I m trying to Apply restrictionusing MAPITable:: Restrict(). But after applying filter I m not getting all expected rows.Example code:
const int nProperties=3; SizedSPropTagArray(nProperties,Columns)={nProperties,{PR_MESSAGE_FLAGS, PR_ENTRYID,PR_SENDER_NAME }};if (m_pContents->SetColumns((LPSPropTagArray)&Columns,0) !=S_OK) return FALSE;SRestriction sres; SPropValue spv; ULONG uCount;m_pContents->GetRowCount(0,&uCount);sres.rt = RES_PROPERTY; spv.ulPropTag = PR_SENDER_NAME; spv.Value.lpszW = (LPWSTR)("Thomson"); sres.res.resProperty.relop = RELOP_EQ; sres.res.resProperty.ulPropTag = PR_SENDER_NAME; sres.res.resProperty.lpProp = &spv; HRESULT hRes = m_pContents->Restrict(&sres,TBL_ASYNC); m_pContents->GetRowCount(0,&uCount);Here after the Filter I m not getting all the rows, which I m expectingall therecived mails from "Thomson". Not understanding what reason behind it..And I m not findng any sample for setting restriction for Time. How would I give My inputs for time. What format of time I have to folow..Any help.. appreciated..
October 21st, 2008 6:25pm
Hello,
You may want to post this in our MSDN forum. People there have better knowledge on scripts and codes. They may help you to go through the script to find out the root cause or, may help you to change the script to achieve what you want.
http://forums.microsoft.com/msdn
Thank you for your understanding and I hope this will be resolved soon.
Best regards,Chang Yin
Free Windows Admin Tool Kit Click here and download it now
October 24th, 2008 2:26pm