Return STG_E_FILEALREADYEXISTS in ole32.StgOpenStorage if the file is not a storage object

Dmitry Timoshkov dmitry at sloboda.ru
Sun Apr 15 05:49:26 CDT 2001


Hello.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Return STG_E_FILEALREADYEXISTS in ole32.StgOpenStorage if the file
    is not a storage object.

--- cvs/hq/wine/dlls/ole32/storage32.c	Tue Apr 10 08:47:34 2001
+++ wine/dlls/ole32/storage32.c	Sun Apr 15 16:51:03 2001
@@ -5485,6 +5485,11 @@
   if (FAILED(hr))
   {
     HeapFree(GetProcessHeap(), 0, newStorage);
+    /*
+     * According to the docs if the file is not a storage, return STG_E_FILEALREADYEXISTS
+     */
+    if(hr == STG_E_INVALIDHEADER)
+	return STG_E_FILEALREADYEXISTS;
     return hr;
   }
   






More information about the wine-patches mailing list