| 296 | } |
| 297 | |
| 298 | bool PropertySystem::GetDisplayNames(std::vector<String>& names) |
| 299 | { |
| 300 | for (const auto& key : m_keys) |
| 301 | { |
| 302 | IPropertyDescription* ppd = nullptr; |
| 303 | if (SUCCEEDED(PSGetPropertyDescription(key, IID_PPV_ARGS(&ppd)))) |
| 304 | { |
| 305 | wchar_t* pDisplayName = nullptr; |
| 306 | if (SUCCEEDED(ppd->GetDisplayName(&pDisplayName)) && pDisplayName != nullptr) |
| 307 | { |
| 308 | names.push_back(pDisplayName); |
| 309 | CoTaskMemFree(pDisplayName); |
| 310 | } |
| 311 | else |
| 312 | { |
| 313 | names.push_back(_T("")); |
| 314 | } |
| 315 | ppd->Release(); |
| 316 | } |
| 317 | else |
| 318 | { |
| 319 | for (const auto& info : g_HashProperties) |
| 320 | { |
| 321 | if (*info.pKey == key) |
| 322 | names.push_back(info.pszDisplayName); |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | return true; |
| 327 | } |
| 328 | |
| 329 | bool PropertySystem::HasHashProperties() const |
| 330 | { |