Chinaunix首页 | 论坛 | 博客
  • 博客访问: 359409
  • 博文数量: 157
  • 博客积分: 3001
  • 博客等级: 中校
  • 技术积分: 1330
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-06 13:47
文章分类

全部博文(157)

文章存档

2011年(1)

2010年(28)

2009年(124)

2008年(4)

我的朋友

分类: WINDOWS

2009-08-13 16:44:21

1.
Any property above 0x80000000 is a named property and the exact tag will
vary from machine to machine and from store provider to store provider.
Categories fits into that named property situation.

To get the correct property tag for a named property you use the
GetIDsFromNames() method. Let's say you have an RDOFolder object that is the
source for the MAPITable. That object has a GetIDsFromNames() method that
you call to get back the correct property tag like this:

string catsGUID = "{00020329-0000-0000-C000-000000000046}";
const int PT_MV_STRING8 = 0x101E;

int Tag = folder.GetIDsFromNames(catsGUID, "Keywords") | PT_MV_STRING8;

A tool like OutlookSpy will let you see the component pieces of named
properties and let you get the GUID, type (PT_MV_STRING8) and ID, which can
be a word or an int value.

MAPI restrictions do take some getting used to, but all in all they're the
most powerful and flexible way to do filtering or restricting.
阅读(1172) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~