| 16 | #include "BT_VistaFileOperation.h" |
| 17 | |
| 18 | LPITEMIDLIST getAbsolutePidlFromAbsFilePath(LPWSTR path) |
| 19 | { |
| 20 | LPITEMIDLIST pidl = NULL; |
| 21 | LPITEMIDLIST pidlAbsolute = NULL; |
| 22 | |
| 23 | // namespace extension root (desktop) for parsing path |
| 24 | LPSHELLFOLDER psfDesktop = NULL; |
| 25 | if (FAILED(SHGetDesktopFolder(&psfDesktop))) |
| 26 | return pidl; |
| 27 | |
| 28 | // parse path for absolute PIDL |
| 29 | if (FAILED(psfDesktop->ParseDisplayName(NULL, NULL, path, NULL, &pidl, NULL))) |
| 30 | return pidl; |
| 31 | |
| 32 | // get the absolute pidl, do not need to free pidlTemp |
| 33 | pidlAbsolute = ILClone(pidl); |
| 34 | |
| 35 | // cleanup |
| 36 | CoTaskMemFree(pidl); |
| 37 | psfDesktop->Release(); |
| 38 | |
| 39 | return pidlAbsolute; |
| 40 | } |
| 41 | |
| 42 | bool moveFilesVistaHelper(QList<LPWSTR>& src, LPWSTR destFolder, QList<FileOperationResult>& results) |
| 43 | { |
no test coverage detected