Shell32 patch 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
- IStream_fnWrite: only return write count if the given pointer parameter is not NULL


Index: memorystream.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/memorystream.c,v
retrieving revision 1.12
diff -u -p -d -r1.12 memorystream.c
--- memorystream.c      8 Sep 2003 19:38:46 -0000       1.12
+++ memorystream.c      17 Jan 2004 11:07:47 -0000
@@ -198,12 +198,17 @@ static HRESULT WINAPI IStream_fnRead (IS

 static HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG* pcbWritten)
 {
+       DWORD dummy_count;
        ICOM_THIS(ISHFileStream, iface);

        TRACE("(%p)\n",This);

        if( !pv )
                return STG_E_INVALIDPOINTER;
+
+       /* WriteFile() doesn't allow to specify NULL as write count pointer */
+       if (!pcbWritten)
+               pcbWritten = &dummy_count;

        if( ! WriteFile( This->handle, pv, cb, pcbWritten, NULL ) )
                return E_FAIL;




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux