MCPcopy Create free account
hub / github.com/bumptop/BumpTop / createShellItemArrayFromPaths

Method createShellItemArrayFromPaths

trunk/win/Source/BT_VistaFileOperation.cpp:157–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool VistaFileOperation::createShellItemArrayFromPaths(QList<LPWSTR>& paths, IShellItemArray** shellItemArray)
158{
159 PCIDLIST_ABSOLUTE_ARRAY pidlArray = new LPCITEMIDLIST[paths.size()];
160 for (int i = 0; i < paths.size(); i++)
161 {
162 LPITEMIDLIST pidl = getAbsolutePidlFromAbsFilePath(paths[i]);
163 if (!pidl)
164 {
165 delete [] pidlArray;
166 return false;
167 }
168 pidlArray[i] = (LPCITEMIDLIST) pidl;
169 }
170
171 HRESULT hr = pSHCreateShellItemArrayFromIDLists(paths.size(), pidlArray, shellItemArray);
172
173 delete [] pidlArray;
174
175 if (SUCCEEDED(hr))
176 return true;
177
178 return false;
179}
180
181bool VistaFileOperation::moveFiles(QList<LPWSTR>& src, LPWSTR destFolder, QList<FileOperationResult>& results)
182{

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected