| 275 | } |
| 276 | |
| 277 | HRESULT DropHandler::CopyShellIDListData(IDataObject *pDataObject, |
| 278 | std::list<std::wstring> &PastedFileList) |
| 279 | { |
| 280 | /* Once this function actually |
| 281 | copies the specified files, this |
| 282 | can be removed. */ |
| 283 | UNREFERENCED_PARAMETER(PastedFileList); |
| 284 | |
| 285 | STGMEDIUM stg; |
| 286 | HRESULT hr; |
| 287 | |
| 288 | hr = pDataObject->GetData(&m_ftcShellIDList,&stg); |
| 289 | |
| 290 | if(hr == S_OK) |
| 291 | { |
| 292 | CIDA *pcida = (CIDA *)GlobalLock(stg.hGlobal); |
| 293 | |
| 294 | if(pcida != NULL) |
| 295 | { |
| 296 | IShellFolder *pShellFolder = NULL; |
| 297 | |
| 298 | auto pidlDirectory = HIDA_GetPIDLFolder(pcida); |
| 299 | |
| 300 | hr = BindToIdl(pidlDirectory, IID_PPV_ARGS(&pShellFolder)); |
| 301 | |
| 302 | if(SUCCEEDED(hr)) |
| 303 | { |
| 304 | LPCITEMIDLIST pidlItem = NULL; |
| 305 | IStorage *pStorage = NULL; |
| 306 | |
| 307 | for(unsigned int i = 0;i < pcida->cidl;i++) |
| 308 | { |
| 309 | pidlItem = HIDA_GetPIDLItem(pcida,i); |
| 310 | |
| 311 | hr = pShellFolder->BindToStorage(pidlItem, NULL, IID_PPV_ARGS(&pStorage)); |
| 312 | |
| 313 | if(SUCCEEDED(hr)) |
| 314 | { |
| 315 | /* TODO: Copy the files. */ |
| 316 | pStorage->Release(); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | pShellFolder->Release(); |
| 321 | } |
| 322 | |
| 323 | GlobalUnlock(stg.hGlobal); |
| 324 | } |
| 325 | |
| 326 | ReleaseStgMedium(&stg); |
| 327 | } |
| 328 | |
| 329 | return hr; |
| 330 | } |
| 331 | |
| 332 | HRESULT DropHandler::CopyAnsiFileDescriptorData(IDataObject *pDataObject, |
| 333 | std::list<std::wstring> &PastedFileList) |