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

Function DirList_GetItemEx

src/Dlapi.c:768–807  ·  view source on GitHub ↗

============================================================================= DirList_GetItemEx() Retrieves extended infomration on a dirlist item

Source from the content-addressed store, hash-verified

766// Retrieves extended infomration on a dirlist item
767//
768int DirList_GetItemEx(HWND hwnd,int iItem,LPWIN32_FIND_DATA pfd)
769{
770
771 LV_ITEM lvi;
772 LPLV_ITEMDATA lplvid;
773
774
775 if (iItem == -1)
776 {
777
778 if (ListView_GetSelectedCount(hwnd))
779
780 iItem = ListView_GetNextItem(hwnd,-1,LVNI_ALL | LVNI_SELECTED);
781
782 else
783
784 return(-1);
785
786 }
787
788 lvi.mask = LVIF_PARAM;
789 lvi.iItem = iItem;
790 lvi.iSubItem = 0;
791
792 if (!ListView_GetItem(hwnd,&lvi))
793 return(-1);
794
795 lplvid = (LPLV_ITEMDATA)lvi.lParam;
796
797 if (NOERROR == SHGetDataFromIDList(lplvid->lpsf,
798 lplvid->pidl,
799 SHGDFIL_FINDDATA,
800 pfd,
801 sizeof(WIN32_FIND_DATA)))
802 return iItem;
803
804 else
805 return(-1);
806
807}
808
809
810//=============================================================================

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected