[SHELL32][SHELLEXT] Fix use of SHFileOperation results and improve log on failure / fix log spam (#3198)

This commit is contained in:
Kyle Katarn
2020-09-18 21:19:55 +02:00
committed by GitHub
parent 3ad5ae6389
commit a5a30fc249
7 changed files with 53 additions and 18 deletions

View File

@@ -157,7 +157,12 @@ CMyDocsDropHandler::Drop(IDataObject *pDataObject, DWORD dwKeyState,
fileop.pFrom = pszzSrcList;
fileop.pTo = szzDir;
fileop.fFlags = FOF_ALLOWUNDO | FOF_FILESONLY | FOF_MULTIDESTFILES | FOF_NOCONFIRMMKDIR;
SHFileOperationW(&fileop);
int res = SHFileOperationW(&fileop);
if (res)
{
ERR("SHFileOperationW failed with 0x%x\n", res);
hr = E_FAIL;
}
// unlock buffer
strSrcList.ReleaseBuffer();