Reece Dunn wrote:
@@ -926,6 +926,13 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR,DWORD,DWORD,BOOL,struct IStream*,s
HRESULT WINAPI SHCreateStreamWrapper(LPBYTE,DWORD,DWORD,struct IStream**);
+#undef IStream_Read +#undef IStream_Write
+HRESULT WINAPI IStream_Read(struct IStream *, LPVOID, ULONG);
+HRESULT WINAPI IStream_Write(struct IStream *, LPCVOID, ULONG);
#endif /* NO_SHLWAPI_STREAM */
/* SHAutoComplete flags */
You've put this in the section guarded by NO_SHLWAPI_STREAM, but in the PSDK header it isn't guarded by this define. If it were the case, then you could have fixed the issue in files that include shlwapi.h by defining this before including it.
However, I think having to work around not being able to use the IStream_Read and IStream_Write macros is a bit ugly.
2008/5/1 Robert Shearman rob@codeweavers.com:
Reece Dunn wrote:
@@ -926,6 +926,13 @@ HRESULT WINAPI
SHCreateStreamOnFileEx(LPCWSTR,DWORD,DWORD,BOOL,struct IStream*,s
HRESULT WINAPI SHCreateStreamWrapper(LPBYTE,DWORD,DWORD,struct
IStream**);
+#undef IStream_Read +#undef IStream_Write
+HRESULT WINAPI IStream_Read(struct IStream *, LPVOID, ULONG);
+HRESULT WINAPI IStream_Write(struct IStream *, LPCVOID, ULONG);
#endif /* NO_SHLWAPI_STREAM */ /* SHAutoComplete flags */
You've put this in the section guarded by NO_SHLWAPI_STREAM, but in the PSDK header it isn't guarded by this define. If it were the case, then you could have fixed the issue in files that include shlwapi.h by defining this before including it.
Ok, I'll move it outside the NO_SHLWAPI_STREAM declaration.
However, I think having to work around not being able to use the IStream_Read and IStream_Write macros is a bit ugly.
I agree, but that is what we are given so there is not a lot we can do.
I did think about tidying it up better, for example there are places where I could have used the shlwapi IStream_Read/Write functions instead, or used IStream_Copy. However, I thought that would be too radical. I am open for suggestions, though.
- Reece