本文整理汇总了C++中LPMESSAGE::GetIDsFromNames方法的典型用法代码示例。如果您正苦于以下问题:C++ LPMESSAGE::GetIDsFromNames方法的具体用法?C++ LPMESSAGE::GetIDsFromNames怎么用?C++ LPMESSAGE::GetIDsFromNames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPMESSAGE
的用法示例。
在下文中一共展示了LPMESSAGE::GetIDsFromNames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadNamedProperties
HRESULT ReadNamedProperties(LPMESSAGE lpMessage, ULONG ulCount, LPMAPINAMEID *lppTag,
LPSPropTagArray *lppPropertyTagArray, LPSPropValue *lppPropertyArray)
{
HRESULT hr = hrSuccess;
ULONG ulReadCount = 0;
hr = lpMessage->GetIDsFromNames(ulCount, lppTag, 0, lppPropertyTagArray);
if(hr != hrSuccess) {
cout << "Failed to obtain IDs from names." << endl;
/*
* Override status to make sure FAILED() will catch this,
* this is required to make sure the called won't attempt
* to access lppPropertyArray.
*/
hr = MAPI_E_CALL_FAILED;
goto exit;
}
hr = lpMessage->GetProps(*lppPropertyTagArray, 0, &ulReadCount, lppPropertyArray);
if (FAILED(hr)) {
cout << "Failed to obtain all properties." << endl;
goto exit;
}
exit:
return hr;
}