[SHELL32][SHELLEXT] Fix use of SHFileOperation results and improve log on failure...
[reactos.git] / dll / shellext / mydocs / CMyDocsDropHandler.cpp
index cd74af6..477ca4b 100644 (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();