[PATCH] hlink: Directly check for S_OK from IHlinkBrowseContext_GetObject().
Zebediah Figura
z.figura12 at gmail.com
Sat Jan 27 15:30:32 CST 2018
Fixes a regression introduced by 00aca1476efd573cbf9d31a45c3d484f6fa6055b
Fixes bug #44423.
Any value other than S_OK should trigger this codepath. In particular, the
system browse context object returns MK_E_UNAVAILABLE.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/hlink/link.c | 2 +-
dlls/hlink/tests/hlink.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c
index 983765c..25ee45d 100644
--- a/dlls/hlink/link.c
+++ b/dlls/hlink/link.c
@@ -493,7 +493,7 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc,
if (phbc)
{
r = IHlinkBrowseContext_GetObject(phbc, mon, TRUE, &unk);
- if (r == S_FALSE)
+ if (r != S_OK)
{
CreateBindCtx(0, &bcxt);
RegisterBindStatusCallback(bcxt, pbsc, NULL, 0);
diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c
index e40807c..3525c44 100644
--- a/dlls/hlink/tests/hlink.c
+++ b/dlls/hlink/tests/hlink.c
@@ -891,7 +891,7 @@ static HRESULT WINAPI HlinkBrowseContext_GetObject(IHlinkBrowseContext *iface,
ok(fBindIfRootRegistered == 1, "fBindIfRootRegistered = %x\n", fBindIfRootRegistered);
*ppiunk = HBC_object;
- return HBC_object ? S_OK : S_FALSE;
+ return HBC_object ? S_OK : 0xdeadbeef;
}
static HRESULT WINAPI HlinkBrowseContext_Revoke(IHlinkBrowseContext *iface, DWORD dwRegister)
--
2.7.4
More information about the wine-devel
mailing list