通过反复试验(和 Google),我设法从 Exchange Server 检索一些 session 扩展属性,如下所示(在我的 SOAP FindItem 调用中):
<typ:AdditionalProperties>
<typ:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyId="3" PropertyType="Binary"/>
<typ:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyId="35" PropertyType="Binary"/>
</typ:AdditionalProperties>
我在 [MS-OXPROPS](Exchange 服务器协议(protocol)主属性列表)中查找了值 3 和 35:
PidLidGlobalObjectId
PidLidCleanGlobalObjectId
但是我对这两个数值不是很满意:如果没有注释,代码就无法理解(如果我输错了值怎么办?)。
这两个属性的 PropertyName 是什么,以便我可以指定 PropertyName
而不是 PropertyId
?
我尝试了这些但没有成功(没有数据返回):
<typ:AdditionalProperties>
<typ:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyName="PidLidGlobalObjectId" PropertyType="Binary"/>
<typ:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyName="PidLidCleanGlobalObjectId" PropertyType="Binary"/>
</typ:AdditionalProperties>
<typ:AdditionalProperties>
<typ:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyName="GlobalObjectId" PropertyType="Binary"/>
<typ:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyName="CleanGlobalObjectId" PropertyType="Binary"/>
</typ:AdditionalProperties>
(注意:对于属性集,有 Commonly used property sets 的交叉引用,但我在这些集中找不到属性名称的任何内容)
最佳答案
根据https://msdn.microsoft.com/en-us/library/office/cc815528.aspx这些甚至都没有命名,所以也许你真的不能为它们使用非数字标识符:
Properties in the range of 0x0001 to 0x7FFF are referred to as tagged properties. Beyond 0x8000 is the range for what is known as named properties, or properties that include a 32-bit globally unique identifier (GUID) and either a Unicode character string or numeric value. Clients can use named properties to customize their property set.
为什么不在代码中直接使用 const
值呢?
顺便说一句,MFCMAPI 是一个很好的工具,无需反复试验即可找到这些 Prop 。
关于soap - PidLidGlobalObjectId 和 PidLidCleanGlobalObjectId 的属性名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31790656/