MCPcopy Create free account
hub / github.com/WinMerge/winmerge / GetDisplayNames

Method GetDisplayNames

Src/PropertySystem.cpp:298–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298bool 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
329bool PropertySystem::HasHashProperties() const
330{

Callers 5

GetDisplayNameMethod · 0.80
LoadListMethod · 0.80
CreatePropertyMenuFunction · 0.80
TEST_FFunction · 0.80

Calls 3

SUCCEEDEDFunction · 0.85
GetDisplayNameMethod · 0.80
ReleaseMethod · 0.45

Tested by 1

TEST_FFunction · 0.64