Signed-off-by: Myah Caron qsniyg@protonmail.com --- dlls/shell32/shelldispatch.c | 17 +++++++++++++++-- dlls/shell32/tests/shelldispatch.c | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index f4947c815f1..3dcfe0ce626 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -1109,10 +1109,23 @@ static HRESULT WINAPI FolderItemImpl_get_Path(FolderItem2 *iface, BSTR *path) static HRESULT WINAPI FolderItemImpl_get_GetLink(FolderItem2 *iface, IDispatch **ppid) { - FIXME("(%p,%p)\n", iface, ppid); + IShellLinkDual2 *link; + HRESULT hr; + FolderItemImpl *This = impl_from_FolderItem(iface); + + TRACE("(%p,%p)\n", iface, ppid);
*ppid = NULL; - return E_NOTIMPL; + + if (!(This->attributes & SFGAO_LINK)) + return E_NOTIMPL; + + hr = ShellLinkObject_Constructor(This, &link); + if (hr != S_OK) + return hr; + + *ppid = (IDispatch*)link; + return S_OK; }
static HRESULT WINAPI FolderItemImpl_get_GetFolder(FolderItem2 *iface, diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 3c1c473dede..622a3a95f9c 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -1490,8 +1490,8 @@ static void test_ShellLinkObject(void)
dispatch = (IDispatch*)0xdeadbeef; hr = FolderItem_get_GetLink(item, &dispatch); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(dispatch && dispatch != (IDispatch*)0xdeadbeef, "got %p\n", dispatch); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(dispatch && dispatch != (IDispatch*)0xdeadbeef, "got %p\n", dispatch);
if (dispatch) { sld = (IShellLinkDual2*)dispatch; -- 2.28.0
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=78643
Your paranoid android.
=== w2008s64 (32 bit report) ===
shell32: shelldispatch.c:1504: Test failed: got L"C:\Users\Administrator\AppData\Local\Temp\winetest_empty_file.txt"
=== w2008s64 (64 bit report) ===
shell32: shelldispatch.c:1504: Test failed: got L"C:\Users\Administrator\AppData\Local\Temp\winetest_empty_file.txt"