请教大家有关短信提取的问题.

tianzhihen_002 2008-06-01 01:27:12
我用的是MAPI来提取本地短信内容,在得到了IMessage*后,提取相关内容属性的值却遇到了问题.
例如下面的代码:
ULONG rgTags[] = {1, PR_SENDER_NAME};


LPSPropValue rgprops = NULL;
HRESULT hRes = S_OK;
ULONG ulValues = 0;
hRes = aMessage->GetProps((LPSPropTagArray)&rgTags, MAPI_UNICODE,&ulValues, &rgprops);


if (S_OK == hRes)
{
if (rgprops[0].ulPropTag == PR_SENDER_NAME)
{
LPWSTR lpBody = rgprops[0].Value.lpszW;
DEBUGMSG(TRUE, (L"From: %s \r\n", rgprops[0].Value.lpszW));

}
}



其中rgprops[0].ulPropTag总是返回0x0000000a,这种情况也发生在了其他一些属性上,到目前只有PR_SUBJECT正常返回了结果.

我查不到0x0000000a是代表什么意思,也搞不懂为什么有的属性可以得到结果,其他的却不行,请大家多多指教!谢谢~~
...全文
76 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
无聊客 2008-06-03
  • 打赏
  • 举报
回复
If GetProps returns MAPI_W_ERRORS_RETURNED because it could not access one or more properties, check the property tags of the returned properties. The failed properties will have the following values set in their property value structure:

Property type in the ulPropTag member set to PT_ERROR.
Property value in the Value member set to a status code for the error, such as MAPI_E_NOT_FOUND.
2021‘someday 2008-06-03
  • 打赏
  • 举报
回复
没搞过,帮顶
btsy2000 2008-06-02
  • 打赏
  • 举报
回复
帮顶,关注中
tianzhihen_002 2008-06-01
  • 打赏
  • 举报
回复
自己顶,请大家帮忙看看.~~

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧