I am trying to use C# to call Extended Mapi and restrict the results of
a search by the recipients email address. I understand that I have to
use the restriction method, but I can't find any samples of using the
subrestriction in C#.
Can anyone point me in the right direction?
Thanks,
Dave
"DaveSam" <daves...@comcast.net> wrote in message
news:1124107313.0...@f14g2000cwb.googlegroups.com...
As Stephen said, it's not meant to work -- however, some people have
posted here in the past who seem to be using something called mapi33.net.
I've never tried it, but it might be worth a look if you're absolutely
stuck using C#. A better would be to switch to C++, where it's got native
support and you won't hit mysterious .net interop problems.
-- dan
Thanks for the response.
However, not sure how you can say that when there are several "How To"
articles that also appear on the Microsoft site with information on
using MAP with c#.
Maybe all those articles should be pulled if you don't "Support" it???
I have been working with MAPI33, but ran into one problem...just
thought I would give this a try.
Thanks again,
Dave
Not any more there aren't. There used to be a couple, (Q315653 and
Q315367), but as far as I know they got taken away -- if you can still
find any, I guess you should keep them quiet so that MS don't remove those
ones as well.
-- dan
Mainly, when these articles do get out there, they're written by folks who
have nothing to do with messaging (in this case, it was a Visual Studio
person) who didn't run their article past us for review.
"Dan Mitchell" <djmit...@yahoo.com> wrote in message
news:Xns96B3804AFDEBEd...@207.46.248.16...
Hi Dave,
If your still using MAPI33 you do it like this:
MAPI33.MapiRestrictions.Restriction startRestriction = new
MAPI33.MapiRestrictions.Compare(
MAPI33.Tags.PR_LAST_MODIFICATION_TIME,
MAPI33.MapiRestrictions.Compare.TYPES.GreaterOrEqual,
new MAPI33.MapiTypes.MapiSysTime(MAPI33.Tags.PR_LAST_MODIFICATION_TIME,
startDate)
);
MAPI33.MapiRestrictions.Restriction endRestriction = new
MAPI33.MapiRestrictions.Compare(
MAPI33.Tags.PR_LAST_MODIFICATION_TIME,
MAPI33.MapiRestrictions.Compare.TYPES.LessOrEqual,
new MAPI33.MapiTypes.MapiSysTime(MAPI33.Tags.PR_LAST_MODIFICATION_TIME,
endDate)
);
MAPI33.MapiRestrictions.Restriction restriction = new
MAPI33.MapiRestrictions.And(new MAPI33.MapiRestrictions.Restriction[]
{startRestriction, endRestriction});
Best regards,
Thomas Andersen