"Reece Dunn" msclrhd@googlemail.com writes:
@@ -120,12 +119,12 @@ static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG* TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbRead);
if (!pv)
- return STG_E_INVALIDPOINTER;
- return S_OK;
It's very unlikely that this is the correct behavior in all cases.
@@ -459,7 +458,9 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, switch(STGM_CREATE_MODE(dwMode)) { case STGM_FAILIFTHERE:
- dwCreate = OPEN_EXISTING;
- if (bCreate && PathFileExistsW(lpszPath))
return HRESULT_FROM_WIN32(ERROR_FILE_EXISTS);
- dwCreate = bCreate ? CREATE_ALWAYS : OPEN_EXISTING;
That case should be handled by CreateFile, you shouldn't check for the file existence explicitly.