| 597 | } |
| 598 | |
| 599 | nfdresult_t NFD_PathSet_GetCount(const nfdpathset_t* pathSet, nfdpathsetsize_t* count) { |
| 600 | assert(pathSet); |
| 601 | // const_cast because methods on IShellItemArray aren't const, but it should act like const to |
| 602 | // the caller |
| 603 | ::IShellItemArray* psiaPathSet = |
| 604 | const_cast<::IShellItemArray*>(static_cast<const ::IShellItemArray*>(pathSet)); |
| 605 | |
| 606 | DWORD numPaths; |
| 607 | if (!SUCCEEDED(psiaPathSet->GetCount(&numPaths))) { |
| 608 | NFDi_SetError("Could not get path count."); |
| 609 | return NFD_ERROR; |
| 610 | } |
| 611 | *count = numPaths; |
| 612 | return NFD_OKAY; |
| 613 | } |
| 614 | |
| 615 | nfdresult_t NFD_PathSet_GetPathN(const nfdpathset_t* pathSet, |
| 616 | nfdpathsetsize_t index, |
no test coverage detected