MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / CopyFilesToFolder

Method CopyFilesToFolder

Explorer++/Helper/FileOperations.cpp:155–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155HRESULT NFileOperations::CopyFilesToFolder(
156 HWND hOwner, const std::wstring &strTitle, std::vector<PCIDLIST_ABSOLUTE> &pidls, bool move)
157{
158 PIDLIST_ABSOLUTE pidl;
159 BOOL bRes = NFileOperations::CreateBrowseDialog(hOwner, strTitle, &pidl);
160
161 if (!bRes)
162 {
163 return E_FAIL;
164 }
165
166 BOOST_SCOPE_EXIT(pidl)
167 {
168 CoTaskMemFree(pidl);
169 }
170 BOOST_SCOPE_EXIT_END
171
172 IShellItem *destinationFolder = nullptr;
173 HRESULT hr = SHCreateItemFromIDList(pidl, IID_PPV_ARGS(&destinationFolder));
174
175 if (FAILED(hr))
176 {
177 return E_FAIL;
178 }
179
180 BOOST_SCOPE_EXIT(destinationFolder)
181 {
182 destinationFolder->Release();
183 }
184 BOOST_SCOPE_EXIT_END
185
186 hr = CopyFiles(hOwner, destinationFolder, pidls, move);
187
188 return hr;
189}
190
191HRESULT NFileOperations::CopyFiles(
192 HWND hwnd, IShellItem *destinationFolder, std::vector<PCIDLIST_ABSOLUTE> &pidls, bool move)

Callers

nothing calls this directly

Calls 1

CopyFilesFunction · 0.85

Tested by

no test coverage detected