MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / IL_GetDisplayName

Function IL_GetDisplayName

src/Dlapi.c:1531–1580  ·  view source on GitHub ↗

============================================================================= IL_GetDisplayName() Gets the Display Name of a pidl. lpsf is the parent IShellFolder Interface dwFlags specify a SHGDN_xx value

Source from the content-addressed store, hash-verified

1529// dwFlags specify a SHGDN_xx value
1530//
1531BOOL IL_GetDisplayName(LPSHELLFOLDER lpsf,
1532 LPCITEMIDLIST pidl,
1533 DWORD dwFlags,
1534 LPWSTR lpszDisplayName,
1535 int nDisplayName)
1536{
1537
1538 STRRET str;
1539
1540 if (NOERROR == lpsf->lpVtbl->GetDisplayNameOf(lpsf,
1541 pidl,
1542 dwFlags,
1543 &str))
1544 {
1545
1546 // Shlwapi.dll provides new function:
1547 return StrRetToBuf(&str,pidl,lpszDisplayName,nDisplayName);
1548 // ...but I suppose my version is faster ;-)
1549 /*switch (str.uType)
1550 {
1551
1552 case STRRET_WSTR:
1553 WideCharToMultiByte(CP_ACP,
1554 0,
1555 str.pOleStr,
1556 -1,
1557 lpszDisplayName,
1558 nDisplayName,
1559 NULL,
1560 NULL);
1561 CoTaskMemFree(str.pOleStr);
1562 break;
1563
1564 case STRRET_OFFSET:
1565 lstrcpyn(lpszDisplayName,
1566 ((WCHAR *)(pidl)) + str.uOffset,
1567 nDisplayName);
1568 break;
1569
1570 case STRRET_CSTR:
1571 lstrcpyn(lpszDisplayName,str.cStr,nDisplayName);
1572 break;
1573
1574 }
1575
1576 return TRUE;*/
1577 }
1578
1579 return FALSE;
1580}
1581
1582
1583

Callers 5

DirList_GetDispInfoFunction · 0.85
DirList_GetItemFunction · 0.85
DriveBox_GetSelDriveFunction · 0.85
DriveBox_SelectDriveFunction · 0.85
DriveBox_GetDispInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected