Akihiro Sagawa : ieframe: Allow STGM_WRITE in IPropertyStorage::Open.
Alexandre Julliard
julliard at winehq.org
Sat Aug 13 14:19:16 CDT 2022
Module: wine
Branch: master
Commit: b1281f9cf89fa50c36fbd7a8b3acbb4475ef9a77
URL: https://gitlab.winehq.org/wine/wine/-/commit/b1281f9cf89fa50c36fbd7a8b3acbb4475ef9a77
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Fri Aug 12 19:45:46 2022 +0900
ieframe: Allow STGM_WRITE in IPropertyStorage::Open.
Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
---
dlls/ieframe/intshcut.c | 5 +++++
dlls/ieframe/tests/intshcut.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/ieframe/intshcut.c b/dlls/ieframe/intshcut.c
index 8938a2d9c71..e1dda3f6c1c 100644
--- a/dlls/ieframe/intshcut.c
+++ b/dlls/ieframe/intshcut.c
@@ -718,9 +718,14 @@ static HRESULT WINAPI PropertySetStorage_Open(
DWORD grfMode,
IPropertyStorage **ppprstg)
{
+ const DWORD STGM_ACCESS_MASK = 0x0000000f;
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
TRACE("(%s, 0x%lx, %p)\n", debugstr_guid(rfmtid), grfMode, ppprstg);
+ /* ole32 doesn't like STGM_WRITE */
+ if ((grfMode & STGM_ACCESS_MASK) == STGM_WRITE)
+ grfMode = (grfMode & ~STGM_ACCESS_MASK) | STGM_READWRITE;
+
/* Note: The |STGM_SHARE_EXCLUSIVE is to cope with a bug in the implementation. Should be fixed in ole32. */
return IPropertySetStorage_Open(This->property_set_storage,
rfmtid,
diff --git a/dlls/ieframe/tests/intshcut.c b/dlls/ieframe/tests/intshcut.c
index 5d9baa7cd9f..b5487491414 100644
--- a/dlls/ieframe/tests/intshcut.c
+++ b/dlls/ieframe/tests/intshcut.c
@@ -236,7 +236,7 @@ static void test_ReadAndWriteProperties(void)
/* Test with STGM_WRITE */
hr = IPropertySetStorage_Open(pPropSetStg, &FMTID_Intshcut, STGM_WRITE, &pPropStgWrite);
- todo_wine ok(hr == S_OK, "Unable to get an IPropertyStorage for writing, hr=0x%lx\n", hr);
+ ok(hr == S_OK, "Unable to get an IPropertyStorage for writing, hr=0x%lx\n", hr);
if (hr == S_OK)
{
More information about the wine-cvs
mailing list